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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to update table with multiples values in one column

Status
Not open for further replies.

max1x

Programmer
Jan 12, 2005
366
US
I have been asked to update a table which holds multiple values in ONE column

COMP/IP/Port --> yes that is the column name :)
CompA ip1 port1
CompA ip1 port2
CompA ip1 port3

now why not break them into diff fields is beyond me. Is there way to update the IP only and leave everything as is, for some reason I'm having a very hard time doing this with a SQL Query.
 
You could use INSTR() and SUBSTR() to extract the COM and PORT information and then rebuild the string with the new IP information when you update the table.

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.

 
Thank you, working on it :), hoping to get this syntax figured out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top