• Minnu (12/17/2013)


    Hi Team,

    Please help in below query, it should return TRUE.

    DECLARE @req_1 varchar(50)

    DECLARE @req_2 varchar(50)

    set @req_1='AAM'

    set @req_2='VVE'

    if (@req_1 !='AAM' OR @req_2 !='VVE')

    print 'TRUE'

    ELSE

    print 'FALSE'

    It's worth noting that you should replace the non-standard syntax: != with <>.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001