Click here to Skip to main content
14,331,980 members
   

Database

 
GeneralRe: How to use sql server database into oracle Pin
Davidduraisamy7-Mar-13 21:30
memberDavidduraisamy7-Mar-13 21:30 
GeneralRe: How to use sql server database into oracle Pin
mhd.sbt7-Mar-13 21:59
groupmhd.sbt7-Mar-13 21:59 
QuestionCreate a table for prices Pin
MedZi20106-Mar-13 18:10
memberMedZi20106-Mar-13 18:10 
AnswerRe: Create a table for prices Pin
Anish_Chakraborty7-Mar-13 0:43
memberAnish_Chakraborty7-Mar-13 0:43 
GeneralRe: Create a table for prices Pin
Davidduraisamy7-Mar-13 1:10
memberDavidduraisamy7-Mar-13 1:10 
AnswerRe: Create a table for prices Pin
Sandeep Mewara7-Mar-13 1:08
mentorSandeep Mewara7-Mar-13 1:08 
AnswerRe: Create a table for prices Pin
MedZi20107-Mar-13 15:29
memberMedZi20107-Mar-13 15:29 
Questionretrieving 3 working days Pin
Member 87018135-Mar-13 7:53
memberMember 87018135-Mar-13 7:53 
ALTER procedure [dbo].[sp_pubhol]
as
begin
declare @i int
declare @NewDate date
set @i = 0
while(@i<3)
    begin        
   IF DATEPART(dw, DATEADD(day,@i,CONVERT(date,GETDATE()))) = 7 OR DATEPART(dw, DATEADD(day,@i,CONVERT(date,GETDATE()))) = 1
   print 'weekend'
   else
   print 'weekday'
   
   select Holiday_Name from Holiday where Holiday_On = DATEADD(day,@i,CONVERT(date,GETDATE()))
SELECT @NewDate = DATEADD(DAY,@i,CONVERT(date,GETDATE()))
   RETURN @NewDate
	select @i = @i+1
	end
end

my task is if today is neither weekend nor public holiday ,i have to that date, increment loop...i have retrieve all the 3 working days...can anyone help me pls
if i want declare @NewDate as array[[3] ,how to declare that..pls help me
AnswerRe: retrieving 3 working days Pin
Mycroft Holmes5-Mar-13 12:01
memberMycroft Holmes5-Mar-13 12:01 
Questionchecking whether today's date is public holiday Pin
Member 87018134-Mar-13 7:08
memberMember 87018134-Mar-13 7:08 
AnswerRe: checking whether today's date is public holiday Pin
David Mujica4-Mar-13 8:20
memberDavid Mujica4-Mar-13 8:20 
AnswerRe: checking whether today's date is public holiday Pin
Mycroft Holmes4-Mar-13 11:43
memberMycroft Holmes4-Mar-13 11:43 
GeneralRe: checking whether today's date is public holiday Pin
Member 87018134-Mar-13 21:28
memberMember 87018134-Mar-13 21:28 
GeneralRe: checking whether today's date is public holiday Pin
Member 87018134-Mar-13 21:41
memberMember 87018134-Mar-13 21:41 
QuestionActivate reminder for event to send email notification 3 days before event Pin
Member 87018133-Mar-13 6:01
memberMember 87018133-Mar-13 6:01 
AnswerRe: Activate reminder for event to send email notification 3 days before event Pin
Mycroft Holmes3-Mar-13 11:59
memberMycroft Holmes3-Mar-13 11:59 
AnswerRe: Activate reminder for event to send email notification 3 days before event Pin
Sandeep Mewara3-Mar-13 18:45
mentorSandeep Mewara3-Mar-13 18:45 
AnswerRe: Activate reminder for event to send email notification 3 days before event Pin
Davidduraisamy4-Mar-13 23:52
memberDavidduraisamy4-Mar-13 23:52 
Questionpeak hours query Pin
Jassim Rahma2-Mar-13 23:38
memberJassim Rahma2-Mar-13 23:38 
AnswerRe: peak hours query Pin
Mycroft Holmes3-Mar-13 12:02
memberMycroft Holmes3-Mar-13 12:02 
AnswerRe: peak hours query Pin
Bernhard Hiller3-Mar-13 20:39
memberBernhard Hiller3-Mar-13 20:39 
AnswerRe: peak hours query Pin
S Douglas4-Mar-13 9:49
professionalS Douglas4-Mar-13 9:49 
QuestionProblem closing patient file! Pin
Jassim Rahma2-Mar-13 21:34
memberJassim Rahma2-Mar-13 21:34 
AnswerRe: Problem closing patient file! Pin
Joezer BH2-Mar-13 21:50
professionalJoezer BH2-Mar-13 21:50 
GeneralRe: Problem closing patient file! Pin
Jassim Rahma2-Mar-13 22:24
memberJassim Rahma2-Mar-13 22:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.