Jump to content

Modifying a field in the Data Base.......


Guest CaseyC

Recommended Posts

Guest CaseyC

Let me start this out with the fact that I know absolutely ZIP about SQL data base. Now, when I entered my data I put an alpha prefix in front of my product codes (i.e. SKU35123). I would like to change this format without having to edit every one of these through my store admin page. Is it possible through the SQL data base administration to remove the alpha characters and just leave the numbers? All of the product codes are in this format and are 3 alphas and 5 numeric digits.

The Field Name is: productCode

The Field Type is: Varchar(60)

Any help would be greatly appreciated.

Thanks,

Klaus Cook

Houston, Texas

www.gifts.jowestcorp.com

Link to comment
Share on other sites

Let me start this out with the fact that I know absolutely ZIP about SQL data base. Now, when I entered my data I put an alpha prefix in front of my product codes (i.e. SKU35123). I would like to change this format without having to edit every one of these through my store admin page. Is it possible through the SQL data base administration to remove the alpha characters and just leave the numbers? All of the product codes are in this format and are 3 alphas and 5 numeric digits.

The Field Name is: productCode

The Field Type is: Varchar(60)

Any help would be greatly appreciated.

Thanks,

Klaus Cook

Houston, Texas

www.gifts.jowestcorp.com

Hi,

First, backup your database or at least export the inventory table. just in case. :)

Then try this sql statement: update `store1_CubeCart_inventory` set productCode = right(productcode,3)

change the name of the inventory table to match yours.

The above statement will chop the first 3 characters of the product code.

Good luck

/Goober

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...