Trying to create a view in a stored procedure:
CREATE PROCEDURE [DATE2] AS
create view pdt (pxid,pdate)
as
(select distinct patid,postdt from main
union
select distinct patid,postdt from archives)
This pops an invalid syntax near keyword 'view' error.
Tried insering a 'go' between create proc and create view, pops an invalid syntax error near 'go'.
Am i just lost today or what ? Thanks !
Pat