Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Update table question

Author  Topic 

aniko
Starting Member

25 Posts

Posted - 2009-07-22 : 22:02:03
Hi all,

I have a table which contains a several fields. One of the fields contents is either a numeric value, or an alpha-numeric value. E.g. "65" or "A 12".

What I want to do is "split" these out into individual fields, so that one field only contains the numeric values, and the other contains the alpha-numeric values. I'm guessing the best way to do this is to create a new field and update the table so it pulls out all alpha-numeric values into a new field and then deletes it from the original.

Do you guys have any advice here as I'm quite new to SQL and struggling to find a solution.

Cheers,
aniko

aniko
Starting Member

25 Posts

Posted - 2009-07-22 : 22:03:55
Also, I don't mind whether I update the table or create a view with these values split.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-07-22 : 23:02:19
use fnFilterString to filter out the numeric part and alpha part.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -