Dear Group,
I am trying to create a view and keep getting the Incorrect syntax near the
keyword 'Declare'" error.
Here is the code I am writing.
Create view fixed_airs (sid, fad_a2, fad_a3) as
Declare @sid int,
@fad_a2 int,
@fad_a3 int
select @sid=cast(substring(subject_id,1,8)as int) ,
@fad_a2 =cast (substring(fad_2_4,1,1) as int),
@fad_a3=cast(substring(fad_2_4,2,1) as int)
from parentpacket.
Thanks for the help in advance.
Jeff Magouirk