Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

column self-update query question

Status
Not open for further replies.

jcf27

IS-IT--Management
Aug 24, 2002
21
0
0
US
I need help in writing a query that will self-update a column.

For example: Column A contains 'ABC.myname'. 'ABC.' is a constant and appears in certain records. How could I easily get rid of it? I tried doing a self-update doing a substring, however, I failed somewhere in the self-join.

Thanks in advance!

J.
 
update t set a = substring(a from 5) where a like 'ABC.%'

The syntax for substring in your DBMS may differ from what is defined in the Core sql 99 specification.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top