Mass SQL Edit?

Kind of a long question, When POS2009 1st came out, you could not create Inv. items with the same Description & I had lots of those types of items (Books). I created a work around by concatenating the Item description & the item # (e.g. ITEM-123456789). Now with the service pack, you can create items with the same description. So, I was wondering if there is a way to remove the item #, everything after"-" ?-123456789?. I have about 49,000 items, so doing this manually would be a huge undertaking. I was wondering if there was a way to do this, possibly in Excel, Access or with a SQL command. It is unfortunate that this was an oversight in the initial release but, as I have learned the hard way, it was not the only one. Any suggestions on how to accomplish this would be appreciated!

Reply to
David D.
Loading thread data ...

if this was RMS, the script would look like this: update item set description=left(description,charindex('-',description)-1) where description like '%-%'

You mention you want to remove everything after the -, but I would think you want to remove the separating dash as well, otherwise take out the '-1'.

I haven't seen the data struction of pos2009, but it should be similar.

You will have a problem if your descriptions also contain extra - marks. If so, use: update item set description=left(description,len(description)-charindex('-',reverse(description))) where description like '%-%'

As usual, this k> Kind of a long question,

Reply to
Matt Hurst

Thanks, I'll try it with a copy of the DB first.

Reply to
David D.

Mega Thanks On that Script! That did exactly what I wanted! THANK YOU!

Reply to
David D.

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.