Forum Replies Created

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

  • RE: Check NOT EXISTS against two tables

    Do I need to use square brackets?

  • RE: Check NOT EXISTS against two tables

    I get this error:

    Msg 102, Level 15, State 1, Server 06LEVINDW, Line 1

    Incorrect syntax near '06'.

    Here is my code. . .

    declare @body1 varchar(4000)

    set @body1 = 'New Website Product for the...

  • RE: Check NOT EXISTS against two tables

    This is what I have. . .

    declare @body1 varchar(4000)

    set @body1 = 'New Website Product for the ' + CONVERT( VARCHAR( 20 ), GETDATE(), 113 ) +

    '. Please see attachment....

  • RE: Check NOT EXISTS against two tables

    Strange. . . It doesn't like that either. . . Now I am getting:

    Msg 102, Level 15, State 1, Server OURSERVER, Line 1

    Incorrect syntax near '.'.

    And I actually am in...

  • RE: Check NOT EXISTS against two tables

    Lowell,

    I'm not sure why this is happening, but I am getting an error when executing the email:

    Msg 208, Level 16, State 1, Server OURSERVER, Line 1

    Invalid object name 'WEB_CATALOG_IMAGES'.

    The query...

  • RE: Check NOT EXISTS against two tables

    Lowell (5/11/2010)


    yes you can, but first you would have to have set up database mail on your server.

    in SSMS,expand the "Management Folder" and find Database Mail. you have to know...

  • RE: Check NOT EXISTS against two tables

    Lowell (5/11/2010)


    man i love details! with your explanation, it looks so easy now!

    I think i have what you want; run this select and confirm whether or not this is finding...

  • RE: Check NOT EXISTS against two tables

    Wow! That seems to do the trick! I had something similar, however, my join wasn't correct and hence why it wasn't working.

    Thank you VERY much, Lowell!

  • RE: Check NOT EXISTS against two tables

    Very well. . . I want to check aganist the WEB_CATALOG_IMAGES table with the Product table. If somehting is in the WEB_CATALOG_IMAGES table that IS NOT in the Product table,...

  • RE: Check NOT EXISTS against two tables

    Lowell (5/10/2010)


    the logic is the same...it's just the test condition that changes:

    don't think you wan t not exists...you want to confirm that there is at least one row on...

  • RE: Check NOT EXISTS against two tables

    Lowell (5/10/2010)


    it's actually easy..you can use multiple AND/OR statements with an IF:

    IF NOT EXISTS(SELECT 1 FROM TABLEA WHERE ID=1)

    AND NOT EXISTS(SELECT...

  • RE: Divide by Zero Error

    Lynn Pettis (8/5/2009)


    That's the difference between a community (SSC) and a forum (all the others).

    Thanks for the compliment (from all of us) and the feedback.

    That's a very good point. ...

  • RE: Divide by Zero Error

    GSquared (8/5/2009)


    cast(

    case sum(IsNull(hmss.delivered_to_date, 0))

    when 0 then 0

    else

    ...

  • RE: Divide by Zero Error

    GSquared (8/5/2009)


    You'd do the same thing as with the other division issue that I posted.

    Use NullIf to turn the denominator into a null if it's zero, then use IsNull to...

  • RE: Divide by Zero Error

    Lynn Pettis (8/5/2009)


    donato1026 (8/5/2009)


    Do you think it may have something to do with this line or the one a couple of lines below it (or both)?

    else ((ABS(SUM(isnull(hmss.CREDIT_MEMOS, 0)) + SUM(isnull(hmss.EVEN_EXCHANGE,...

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