We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

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

jaymz69
jaymz69 asked
on
Medium Priority
202 Views
Last Modified: 2012-05-11
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?
Comment
Watch Question

Commented:
select right(fieldname, 2) from ...

Author

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

ex.  'SOMEWHERE       ST'

needs to be 'SOMEWHERE'     'ST'
Data Engineer
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.