Forum Replies Created

Viewing 15 posts - 61 through 75 (of 433 total)

  • RE: Date conversion

    We generally use CCYYMM format to retain the sorting when grouping aggregates into months.

    SELECT datepart(yyyy,getdate()) * 100 + datepart(mm,getdate())

  • RE: Multiple Recipients

    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....

  • RE: Multiple Recipients

    adekunle (4/8/2008)


    i mean ALZDBA's cursor solution does not work, i need another solution that works. I am sure many of us receive newsletters and we don't see other recipients email...

  • RE: Field value showing as 8.00002e+007

    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...

  • RE: Finding open records over time without loop

    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...

  • RE: Finding open records over time without loop

    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...

  • RE: Finding open records over time without loop

    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.

  • RE: Multiple Recipients

    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...

  • RE: Get date range from Week

    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)))

  • RE: Get date range from Week

    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)))...

  • RE: FTP SQL job error

    If you ftp from a dos window on the server does it work?

  • RE: Import XML data into SQL7

    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...

  • RE: copy "entire" nText column from TableB to TableA

    Thanks Segiy,

    I must not have copied the last line out of QA when I posted.

  • RE: Update or Insert from one table to another

    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...

  • RE: Update or Insert from one table to another

    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...

Viewing 15 posts - 61 through 75 (of 433 total)