Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
bewek
Starting Member
7 Posts |
Posted - 2010-10-19 : 04:32:13
|
| I need advice on how I can do one update the entire table. I have a table where it is stored: time, category number and serial number. The table has several thousand lines. I need all rows to make all the serial numbers added one character. So I need this data as SELECT to choose a character to add and update. Using conventional UPDATE It's impossible right? They say it is a temporary table, but I do not know how to do it. Written by someone to wash an example so I can do. Thank you. The table in Oracle (PL / SQL). |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-10-19 : 04:53:54
|
| Post some sample data of what you want.PBUH |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-10-19 : 04:54:57
|
Or better try to get help in an oracle forum? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
bewek
Starting Member
7 Posts |
Posted - 2010-10-19 : 07:16:43
|
| I have table with:date category serial_number2010-10-02 09:21:08 OH 6858094567562010-10-02 09:22:08 BM 6686858658692010-10-02 09:23:08 CC 6832342342362010-10-02 09:25:08 OH 685808909876I needdate category serial_number2010-10-02 09:21:08 OH 685809456756T2010-10-02 09:22:08 BM 668685865869T2010-10-02 09:23:08 CC 683234234236T2010-10-02 09:25:08 OH 685808909876TTable has 20 thousand rows. |
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-10-19 : 07:32:08
|
If the datatype of serial_number is varchar then the following query will workUpdate yourtable set serial_number= serial_number + '' + 'T' PBUH |
 |
|
|
Devart
Posting Yak Master
102 Posts |
Posted - 2010-10-19 : 07:42:59
|
| Hi,For example:UPDATE <your_table_name>SET serial_number=serial_number || 'T';Best regards,Devart,SQL Server Tools:dbForge Schema ComparedbForge Data ComparedbForge Query Builder |
 |
|
|
bewek
Starting Member
7 Posts |
Posted - 2010-10-19 : 08:04:05
|
| Thank you very very much. I can not wait to try it at work. You've helped me. :) |
 |
|
|
|
|
|