Link to home
Start Free TrialLog in
Avatar of jaymz69
jaymz69

asked on

create a Field for City and State that is in one field in DB2

So the city and state is in one field in the DB2
what would be the sybtex in SQL 2008 R2 to start on the far right
go back two positions (the State in two positions)
and create that as its own field?
Avatar of sshah254
sshah254

select right(fieldname, 2) from ...
Avatar of jaymz69

ASKER

so that would take the state out and into its own field?

ex.  'SOMEWHERE       ST'

needs to be 'SOMEWHERE'     'ST'
ASKER CERTIFIED SOLUTION
Avatar of Sharath S
Sharath S
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial