BEGIN TRAN
UPDATE [table]
SET
LATEST_CHANGED_DATE = getDate(),
LATEST_CHANGED_BY = SYSTEM_USER
WHERE [critera] = 'True'
COMMIT
In table:
LATEST_CHANGED_DATE LATEST_CHANGED_BY
2008-10-24 10:37:26.470 Stefan
BEGIN TRAN
UPDATE [table]
SET
LATEST_CHANGED_DATE = getDate(),
LATEST_CHANGED_BY = SYSTEM_USER
WHERE [critera] = 'True'
COMMIT
--Example of multiple insert
--Create temp table
CREATE TABLE #fpp([RID] int NOT NULL IDENTITY (1, 1) PRIMARY KEY, [MY_DATA] varchar(30))
go
--Insert multiple data using union
insert into #fpp ([MY_DATA])
select
(select 'data1') union
(select 'data2') union
(select 'data3') union
(select 'date4')
go
select * from #fpp
--Clean up
drop table #fpp
![]() | I have worked with test and development since 1994 in various domains and specializing in the financial sector during the last 13 years. Likes to develop tools tailored made for the context, enhancing testability. |
| Follow @StefanThelenius |