Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2006
    Location
    DC
    Posts
    123

    Unanswered: Why does one yield no and the second yield yes

    My eyes have to be deceiving me....

    DECLARE @SQL varchar(1000)
    --DECLARE @IsSanitized bit
    DECLARE @DatabaseName varchar(50)
    SET @DatabaseName = 'MproOps_05262010'
    --PRINT @DatabaseName

    IF EXISTS(SELECT IsSanitized FROM dbo.MproSanitizeHistory WHERE DbName = ''' + @DatabaseName + ''' AND IsSanitized = 0)
    --IF EXISTS(SELECT IsSanitized FROM dbo.MproSanitizeHistory WHERE IsSanitized = '0')
    BEGIN
    --SET @IsSanitized = 1
    PRINT 'yes'
    END
    ELSE
    BEGIN
    PRINT 'no'
    END





    2nd *************************
    DECLARE @SQL varchar(1000)
    --DECLARE @IsSanitized bit
    DECLARE @DatabaseName varchar(50)
    SET @DatabaseName = 'MproOps_05262010'
    --PRINT @DatabaseName

    IF EXISTS(SELECT IsSanitized FROM dbo.MproSanitizeHistory WHERE DbName = ''' + @DatabaseName + ''' AND IsSanitized = 0)
    --IF EXISTS(SELECT IsSanitized FROM dbo.MproSanitizeHistory WHERE IsSanitized = '0')
    BEGIN
    --SET @IsSanitized = 1
    PRINT 'yes'
    END
    ELSE
    BEGIN
    PRINT 'no'
    END

  2. #2
    Join Date
    Jun 2006
    Location
    DC
    Posts
    123
    wow im tired.... disregard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •