Viewing 15 posts - 61 through 75 (of 433 total)
We generally use CCYYMM format to retain the sorting when grouping aggregates into months.
SELECT datepart(yyyy,getdate()) * 100 + datepart(mm,getdate())
April 17, 2008 at 1:55 pm
because we are using a cursor loop the @toemail variable is only holding one email address at a time so it will handle as many email addresses as you need....
April 10, 2008 at 7:22 am
adekunle (4/8/2008)
April 9, 2008 at 7:53 am
What type of field is CustomerNo is your sql table? How is the column formatted in the excel sheet? It sounds like you imported the field from a...
April 8, 2008 at 1:32 pm
I tested mine with a million rows and it took a really long time to run. I only had a PK on the record number so an index on...
April 8, 2008 at 7:32 am
build your numbers table ( I call mine tally because Jeff Moden does:D. n is the field that hold the sequential numbers in Tally) like GSquared said.
select count(visitid),dateadd(hh,n,'1/1/2005') from...
April 7, 2008 at 2:24 pm
Please post your table structure, sample data, expected results from the sample data, and any code you have put together so far so we can help you.
April 7, 2008 at 12:39 pm
I ran your procedure as it exists (except I used my own mail server) and it worked fine for me. Are you getting any kind of an error message?
I would...
April 7, 2008 at 12:35 pm
create this as a view or subquery and join your dates week to it.
declare @sdate datetime
select @sdate = '1/1/2008'
select min(dateadd(dd,n,@sdate)),
max(dateadd(dd,n,@sdate)),
datepart(wk,(dateadd(dd,n,@sdate)))
from tally
where datepart(yyyy,(dateadd(dd,n,@sdate))) = datepart(yyyy,@sdate)
group by datepart(wk,(dateadd(dd,n,@sdate)))
order by datepart(wk,(dateadd(dd,n,@sdate)))
April 2, 2008 at 12:42 pm
As Michael said, it depends on your defintions but you can use a tally table like this
declare @sdate datetime
select @sdate = '1/1/2000'
select dateadd(dd,n,@sdate) ,
datepart(wk,(dateadd(dd,n,@sdate))),
datepart(yyyy,(dateadd(dd,n,@sdate))),
datepart(dw,(dateadd(dd,n,@sdate)))
from tally
where datepart(wk,(dateadd(dd,n,@sdate))) = 14
and datepart(yyyy,(dateadd(dd,n,@sdate)))...
April 2, 2008 at 12:00 pm
If you ftp from a dos window on the server does it work?
April 2, 2008 at 11:33 am
I will repost the XML when I get into the office tomorrow. If I had a newer version of SQL I could use the OPENXML and be done with...
April 1, 2008 at 8:15 pm
Thanks Segiy,
I must not have copied the last line out of QA when I posted.
March 31, 2008 at 9:02 am
You would have a table that contains the computerid and the softwareid with a record for every piece of software that is installed on each computer. You would then...
March 28, 2008 at 8:06 pm
One thing you could do to make this a little more friendly is change your Perl script to create 2 files. One would contain the data for the computer...
March 28, 2008 at 3:32 pm
Viewing 15 posts - 61 through 75 (of 433 total)