Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inser into
Message
 
 
To
03/09/2001 02:34:53
Victor Lapid
Phil. Long Distance Tel. Co.
Manila, Philippines
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
00551697
Message ID:
00551838
Views:
18
You can use INSERT INTO ... SELECT FROM ...
insert INTO table2 
    (lastname,firstname,address,account,telno) 
 SELECT lastname,firstname,address,account,telno
    FROM table1 
    where account = "123456" and telno="7435143"  
>I have a stored procedure that goes like this:
>
>create procedure test
>
>as
>
>update set flag="D" where account = "123456" and telno="7435143" blah blah
>
>I'm trying to put a logical "delete" flag into my table just to mark this row as an old record.
>
>my problem is , I've wanted a row to be inserted (after an update) into my table with same values as in the previously "deleted " record marked with "D".
>
>like this one: insert from table (lastname,firstname,address,account,telno) values {same values from old record marked with "D")
>
>Please help.....
>
>TIA.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform