Microsoft
Software
Hardware
Network
Question : SQL Insert
I have a sql INSERT statement where I just copy another row of data. The problem is, I do not want to copy the datetimereceived field. I want it to insert the current date and time and then copy the other fields. Does anyone know how to do that, using the GetDate() feature? This is my current stored procedure:
Begin
INSERT INTO Orders (DateTimeReceived, FirstName, LastName) SELECT DateTimeReceived, FirstName, LastName FROM Orders WHERE Variable = @Variable
End
Answer : SQL Insert
Begin
INSERT INTO Orders (DateTimeReceived, FirstName, LastName) SELECT GETDATE(), FirstName, LastName FROM Orders WHERE Variable = @Variable
End
Random Solutions
How to Reset Administrator Password in a Batch Mode
Outlook can't connect to incoming mail server - but can ping it - what setting am I missing?
Date_lov.get_date
Level of Support for Oracle Technologies
Is it efficient to have many thousands of tables in a single database?
Backup Exec 11d Causing Server Crashes
What's wrong with this script?
P2V to VMware Virtual server (free version)
making external usb hardrive bootable for xp pro
Link excel spreedsheet to Sql Server table