Forum Replies Created

Viewing 15 posts - 46 through 60 (of 294 total)

  • RE: Datetime Column Problem

    Found it. Although the view was a datetime datatype, the undelying table was changed to nvarchar. I scripted the changes from the staging db and forgot this crucial difference......

  • RE: Left Anti Semi Joins

    An anti join is not called explicitly with 'Anti Join' syntax. it is how you use it. Specifically, if you want all records in one table where not in...

  • RE: Crosstab type report -- Horizontal Summray

    I know I'm late to the party but here is how i would call a stored proc with parameters in vba

    Sample Proc

    alter procedure usp_testProc

    @param1 int = NULL,

    @param2 int = NULL,

    @param3...

  • RE: How to query data on weekly basis

    Despite the hints, it's beyond my ken. I have got round it by leaving the where clause off and not having a totals column all together. The subtle...

  • RE: How to query data on weekly basis

    Jeff

    I think you have not quite got what I am saying. Apologies, I didn't explain it clearly 😉

    Running the code above works as you say, producing zeroes in week 49....

  • RE: How to query data on weekly basis

    David Jackson (6/11/2009)


    Jeff

    do we not need the following in the last part of dynamic SQL?

    I have noticed if you do put the date range in the where clause, and you...

  • RE: SSIS issue

    I have to admit I do not know SSIS at all! But I do know DTS, and I'm sure the equivalent steps I'm about to outline are there.

    A. Turn...

  • RE: SSIS issue

    I would import the file intro an empty staging table. It would then be a 3 step operation

    1. Update existing rows with an inner join between destination & staging

    2....

  • RE: How to query data on weekly basis

    Jeff

    do we not need the following in the last part of dynamic SQL?

    + 'WHERE (BusinessDate >= ''' + CONVERT(CHAR(10),@FiscalYearStartDate,101) + ''' and BusinessDate <=...

  • RE: Database Server Upgrades – The Plan, The Template, and The Task List

    I can't agree more with all of the above, good article. I posted a reply to an how do I move to a cluster once, let me find it....

    Here...

  • RE: There Must Be 15 Ways To Lose Your Cursors... part 1, Introduction

    RJ (4/14/2009)


    I would like to see how you can eliminate using a CURSOR or WHILE loop for sending emails using "msdb.dbo.sp_send_dbmail". My requirement would be to send email notifications to...

  • RE: Group by Age Range

    Cracked it, thanks to GSquared and Marks help. I noticed that Mark results differed from mine by one on 3 age groups, 41-50, 61-70 and 71-80, and frankly as...

  • RE: Group by Age Range

    Thanks to both of you. Marks solution is interesting as it uses a 2005/08 feature I've seen but never used. This is my first position where SQL >...

  • RE: Create INSERT statements from Excel

    I too liked this script 🙂

    I modified it a little so that any single quotes are replaced, the results are put into the last column and it prompts you for...

  • RE: The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

    Hugo Kornelis (2/14/2009)


    ... no, the answer is not a tally table. It is, as you already suspected, a self join. Or rather twelve self joins.

    Aha! Many thanks Hugo....

Viewing 15 posts - 46 through 60 (of 294 total)