Hello all,
Is there a way for me to copy a row, do some modification in a certain row and insert it to the same table as a new row
Forward with thousand thanks.
Best regards,
Tee Song Yann
Getting started with SQL Server
Hello all,
Is there a way for me to copy a row, do some modification in a certain row and insert it to the same table as a new row
Forward with thousand thanks.
Best regards,
Tee Song Yann
Hello Jens,
I'm trap in a pure SQL query's world. Imagine you are performing the above task in SQL Server Management Studio.
Best regards,
Tee Song Yann
Sorry I think I guide you people to the wrong place.
Actually it should be "Imagine you are performing the above task in SQL Server Management Studio SQL Query".
Can I perform that with SQL statement only
Thanks.
OK, yes this is sure possible:
INSERT INTO SomeTable2
(ColumnListHereto Insert)
Select YourColumnsHere
From SomeTable
Where ConditionsTofilterYourRow
Instead of YourColumnsHere you can use any manipulation on the data you want like
REPLACE(SomeColumn, 'a','b'), LEFT(SomeOtherColum,3)
Jens K. Suessmeyer.
---
http://www.sqlserver2005.de
---
Hello Jens,
Thanks for your help. Then I better post more question here. Wahaha.
Thanks again and best regards.
Tee Song Yann