June 23, 2015 at 12:24 pm
I am new to sql server so I am wondering if someone can help me here. I don't know what I am doing wrong, but I am getting this error "Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'AS'."
Create TABLE [T387Temp]
AS
(Select [C1] ,
[C2] ,
DATEADD(S, C3, '1970-01-01 00:00:00') AS [C3] ,
[C4] ,
[C5] ,
[C6] ,
[C7] ,
[C8] ,
[C112],
[C675001003] ,
[C812000101] ,
[C875000000] ,
[C875000001],
[C875000002] ,
[C875000003] ,
[C875000004] ,
[C875156000] ,
[C875156001] ,
[C875156002] ,
[C875156005] ,
[C875156006] ,
[C875156007] ,
[C875156003] ,
[C875156004]
FROM [dbo].[T387])
GO
June 23, 2015 at 12:30 pm
Select [C1] ,
[C2] ,
DATEADD(S, C3, '1970-01-01 00:00:00') AS [C3] ,
[C4] ,
[C5] ,
[C6] ,
[C7] ,
[C8] ,
[C112],
[C675001003] ,
[C812000101] ,
[C875000000] ,
[C875000001],
[C875000002] ,
[C875000003] ,
[C875000004] ,
[C875156000] ,
[C875156001] ,
[C875156002] ,
[C875156005] ,
[C875156006] ,
[C875156007] ,
[C875156003] ,
[C875156004]
INTO [T387Temp]
FROM [dbo].[T387]
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply