Forum Replies Created

Viewing 15 posts - 3,421 through 3,435 (of 3,543 total)

  • RE: Using Week Numbers

    Great.

    If you want to process the late renewals you can use

    CASE WHEN (@WeekNo - 2) < 1 THEN (@WeekNo - 2 + 52) ELSE (@WeekNo - 2) END

    and change the...

  • RE: Using Week Numbers

    WHERE SU_RenewalWeek = (CASE WHEN @WeekNo > 50 THEN (@WeekNo-50) ELSE (@WeekNo + 2) END)

    will cater for @WeekNo+2 for weeks 51+

    Can u explain what you are trying to do for

    'This...

  • RE: Convert week number to date range

    Not pretty but give you what u want

    declare @d datetime

    declare @w int

    set @d = '2003-01-01'

    set @w = 5

    set datefirst 1

    set @d = @d-(datepart(dw,@d)-1)

    select @d+((@w -1) * 7),(@d+((@w -1) * 7))+6

    ...

  • RE: bcp

    I would use

    bcp "select icol1,col2 from databasename..tablename" queryout filename.csv -c -t "," /S servername /U username /P password

    But as Guarddata stated, maybe DTS would be better.

  • RE: Basic Question

    I would not update Person each time but use the input to identify the record to get the PersonID for the insert into the Task table. I would supply a...

  • RE: saving to file(s) with analyzer

    When I wanted to output data to several text files I used ISQL.

  • RE: Insert 1 to n records with a single SQL statement

    Do not know of a way to insert multiple records without selecting from another table.

    You could create a permanent table with the maximum number of entries and then select from...

  • RE: Sending Attachment with Cdosys

    Clive,

    I answered your query on another thread but there seems to be a common problem with cdosys and attachments. Many people have posted their procs on this site and I...

  • RE: distinct output require

    Need to add another subquery

    select count(*) from (select candidateid,count(*) as 'skillct'

    from (select distinct candidateid,skill from #skillset) a

    where @list like '%'+skill+'%' group by candidateid having count(*) = @kount) b

  • RE: Comma Delimited BCP

    Rachel r u still having problems. Can u post more info, SQL version, bcp command line parameters (without security info) etc. Anything would be of help.

  • RE: Worst Security hole I have ever seen

    Thats great and speaks a lot about yourself and your honesty. As I explained I call my a DBA in title only, I too am only starting on this long...

  • RE: Worst Security hole I have ever seen

    Nice post Tim. I too have to learn in my own time as well (VB, VC++, TSQL, HTML etc) and been using SQL since 6.5. I think you probably undersell...

  • RE: Sending emails with CDOSYS

    There are several threads on this site referring to your query and most seem to be attachments. I used the following snippet to add an attachment

    EXEC @hr = sp_OAMethod @iMsg,...

  • RE: distinct output require

    Assume you pass skill list and count of skills then try

    declare @list varchar(100),@kount int

    set @list = 'xml,oracle'

    set @kount = 2

    select count(*) from (select candidateid,count(*) as 'skillct' from skillset where @list...

  • RE: Comma Delimited BCP

    Is this a SQL2K issue. I have SQL7 SP4 and I never get trailing spaces with bcp for varchar columns.

Viewing 15 posts - 3,421 through 3,435 (of 3,543 total)