Click here to Skip to main content
15,922,145 members
Home / Discussions / Database
   

Database

 
GeneralRe: how to store an image Pin
Pete O'Hanlon30-Aug-07 1:03
mvePete O'Hanlon30-Aug-07 1:03 
GeneralRe: how to store an image Pin
prasadbuddhika30-Aug-07 2:26
prasadbuddhika30-Aug-07 2:26 
AnswerRe: how to store an image Pin
shivvish30-Aug-07 21:23
shivvish30-Aug-07 21:23 
QuestionHow to calculate no of sundays between two dates in sql Pin
ahmedalisha30-Aug-07 0:07
ahmedalisha30-Aug-07 0:07 
AnswerRe: How to calculate no of sundays between two dates in sql Pin
gauthee30-Aug-07 0:41
gauthee30-Aug-07 0:41 
AnswerRe: How to calculate no of sundays between two dates in sql [modified] Pin
John-ph30-Aug-07 1:37
John-ph30-Aug-07 1:37 
GeneralRe: How to calculate no of sundays between two dates in sql Pin
shivvish30-Aug-07 21:18
shivvish30-Aug-07 21:18 
AnswerRe: How to calculate no of sundays between two dates in sql Pin
shivvish30-Aug-07 21:16
shivvish30-Aug-07 21:16 
hi here is the code for calculating the no of sudays between two given sqldates.

create PROCEDURE pr_displaysundays
-- Add the parameters for the stored procedure here
@fromdate varchar(10),
@todate varchar(10)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements.
SET NOCOUNT ON;
declare @diffDay int
declare @Cnt int
declare @Nos int
select @Diffday=datediff(day,@fromdate,@todate)
set @cnt=0
set @Nos=0
while @cnt<@diffday
begin
if datepart(dw,cast(convert(varchar(10),@fromdate,101) as datetime)+@cnt)=1
begin
set @Nos=@Nos+1
end
set @cnt=@cnt+1
end
print @Nos
END
AnswerRe: How to calculate no of sundays between two dates in sql Pin
DQNOK31-Aug-07 4:00
professionalDQNOK31-Aug-07 4:00 
Questionhow to use max function Pin
prasadbuddhika29-Aug-07 23:59
prasadbuddhika29-Aug-07 23:59 
AnswerRe: how to use max function Pin
Pete O'Hanlon30-Aug-07 0:03
mvePete O'Hanlon30-Aug-07 0:03 
GeneralRe: how to use max function Pin
prasadbuddhika30-Aug-07 0:13
prasadbuddhika30-Aug-07 0:13 
GeneralRe: how to use max function Pin
Pete O'Hanlon30-Aug-07 1:02
mvePete O'Hanlon30-Aug-07 1:02 
GeneralRe: how to use max function Pin
prasadbuddhika30-Aug-07 2:24
prasadbuddhika30-Aug-07 2:24 
GeneralRe: how to use max function Pin
Vimalsoft(Pty) Ltd30-Aug-07 19:40
professionalVimalsoft(Pty) Ltd30-Aug-07 19:40 
AnswerRe: how to use max function Pin
Vimalsoft(Pty) Ltd30-Aug-07 1:14
professionalVimalsoft(Pty) Ltd30-Aug-07 1:14 
GeneralRe: how to use max function Pin
prasadbuddhika30-Aug-07 2:25
prasadbuddhika30-Aug-07 2:25 
GeneralRe: how to use max function Pin
Urs Enzler30-Aug-07 7:22
Urs Enzler30-Aug-07 7:22 
GeneralRe: how to use max function Pin
Vimalsoft(Pty) Ltd30-Aug-07 19:47
professionalVimalsoft(Pty) Ltd30-Aug-07 19:47 
QuestionHow to create a new record, as part of a batch run, in MSAccess Pin
jonathanm529-Aug-07 22:08
jonathanm529-Aug-07 22:08 
AnswerRe: How to create a new record, as part of a batch run, in MSAccess Pin
Pete O'Hanlon29-Aug-07 23:05
mvePete O'Hanlon29-Aug-07 23:05 
QuestionVariable database name when executing stored procedure Pin
John Gathogo29-Aug-07 22:00
John Gathogo29-Aug-07 22:00 
AnswerRe: Variable database name when executing stored procedure Pin
DLM@TD14-Sep-07 11:31
DLM@TD14-Sep-07 11:31 
QuestionDIFFERENCE Pin
aprasy29-Aug-07 9:30
aprasy29-Aug-07 9:30 
AnswerRe: DIFFERENCE Pin
Pete O'Hanlon29-Aug-07 9:52
mvePete O'Hanlon29-Aug-07 9:52 

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.