Forum Replies Created

Viewing 15 posts - 23,596 through 23,610 (of 26,486 total)

  • RE: Update with Join?

    Not sure, but give this a try:

    with UniqueBookings (

    MeetingID,

    BookingID

    ) as (

    select distinct

    MeetingID,

    BookingID

    from

    ...

  • RE: DATEADD Function not working like I am expecting

    More work for you. Would you please explain the PMT_FREQ, PMT_FREQ_MULT, any gotcha's we may need to know (like no payments due on Saturdays or Sundays, or official holidays).

    I'd...

  • RE: Function that finds Sundays

    andrewd.smith (11/21/2008)


    select getdate() + 7 - Datepart(dw, getdate())

    This only works if @@DATEFIRST = 1 (Monday)

    An expression that returns the date of the Sunday in the current week regardless...

  • RE: Function that finds Sundays

    Directed more to the OP, but based on your suggestion, which didn't work on my servers here at work. It returns the Saturday following the given date, not Sunday....

  • RE: Function that finds Sundays

    Glen (11/21/2008)


    select getdate() + 7 - Datepart(dw, getdate())

    Also, on my server here at work, the above returns tomorrow (Saturday), not a Sunday.

  • RE: Function that finds Sundays

    Glen (11/21/2008)


    select getdate() + 7 - Datepart(dw, getdate())

    Given 2008-11-19 which Sunday do you want, 2008-11-16 or 2008-11-23?

  • RE: DATEADD Function not working like I am expecting

    Yes, I got the image via PM. You may want to see if you can get it into this forum thread so others can see it. If needed,...

  • RE: DATEADD Function not working like I am expecting

    john.steinbeck (11/21/2008)


    Ok, row 85 is a new ID, 101 and 102 are new ID's and so is 103 ending @ 111...

    when i get the data, it's not ballooned out like...

  • RE: Function that finds Sundays

    marty.seed (11/21/2008)


    Hey there group,

    I need to build a function that takes in a date and then returns the corresponding Sunday to that date.

    Any ideas?

    Marty

    Could you please provide some examples...

  • RE: Stock Ledger - Without cursor

    andrewd.smith (11/21/2008)


    This is one of those situations where using a cursor is the more natural approach and will probably be more efficient than any possible single query approach.

    Andrew Smith

    Not true!...

  • RE: ANNOYED: SSMS messes with formatted scripts

    Different people may use different settings for tabs. I set up SSMS to replace tabs with spaces which eliminates this as an issue with my formatted scripts.

  • RE: Counts from two tables?

    Hope the following (with changes) helps.

    create table dbo.Orders (

    OrderID int,

    UserName varchar(25),

    OrderDate datetime

    );

    create table dbo.Tasks (

    ...

  • RE: DATEADD Function not working like I am expecting

    Here is what I am trying to get at:

    what you are getting ...

  • RE: Msg 102, Level 15, State 1, Line 16

    I have taken a closer look at your code, and it won't work. I just noticed the wildcard you are trying to use in the BUL INSERT pathname, and...

  • RE: Stock Ledger - Without cursor

    Ravi,

    I actually want to point you to both articles listed below in my signature block. The first, which you already have been referred to, will help you get better...

Viewing 15 posts - 23,596 through 23,610 (of 26,486 total)