Hi,
I am creating a temporary table, and trying to insert data into the temporary table.
CREATE TABLE #TempSelected
(
OrderNum int IDENTITY(1,1),
Global_ID binary(8),
TimeStamp datetime,
)
CREATE CLUSTERED INDEX PIX_TempSelected ON #TempSelected(OrderNum)
SET IDENTITY_INSERT #TempSelected ON;
INSERT INTO #TempSelected
SELECT AST.TimeStamp, AST.Global_ID
(
dbo.StateChanges AS AST WITH (NOLOCK)
JOIN #T_Names AS TAG ON AST. ...
Go to the complete details ...