October 11, 2007 at 5:13 am
Hi there,
I have imported a table from excel. But unfortunately the table holds a column containing letters and digits, ex.
NameCode
The new institution 357056
Broadway, Upper 486001
Southwest, No. 1 987003
the last 6 characters are always digits. I need to split the column into two seperate columns like,
Name Code
The new institution 357056
Broadway, Upper 486001
Southwest, No. 1 987003
Right(NameCode, 6) gives me the Codes in one column, but how do I select the preceding name?
Best joejoe
October 11, 2007 at 5:23 am
THis should do the trick:
SELECT LEFT(NameCode, LEN(NameCode)-6)
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
October 11, 2007 at 6:29 am
Thanks alot 🙂 - just what I needed
Regards joejoe
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply