![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I need to populate a global variable by getting a output parameter from the execution of following sql on sybase. But when i click the parameters button, i get following error "the sql statement does not contain any parameters". I tried sql with meta data same as output produced by this sql. E.g. "select convert(char(8), getdate(), 112) as businessday" and then putting real sql using disconnected edit. Still i couldn;t make any headway. Any ideas... -------------------------------------------------------------------------- set nocount on declare @ctr int, @weekday int, @lastBusinessDay datetime,@lbdFound int,@cnt int select @ctr=1 select @lbdFound=0 while (@lbdFound<>1) begin select @lastBusinessDay = dateadd(dd, - @ctr, GETDATE()) select @weekday= datepart(dw, @lastBusinessDay) if ((@weekday<>1) AND (@weekday<>7)) AND not exists(select * from holiday where holiday_date=@lastBusinessDay) select @lbdFound=1 select @ctr = @ctr +1 end select convert(char(8), @lastBusinessDay , 112) as businessday go -------------------------------------------------------------------------- ---- Thanks, pradeep |
![]() |
| Thread Tools | |
| Display Modes | |
| |