Home Forums SQL Server 2008 SQL Server Newbies IF ELSE or UNION to eet two different data sets to play nice RE: IF ELSE or UNION to eet two different data sets to play nice

  • Looking at the IF statement, please bear in mind that the ordering of results of a SELECT are not guaranteed.

    Try maybe (select top 1 GBankAllocInfCheckID from PCLAWDB_56830.dbo.GBAlloc ORDER BY GBankAllocInfCheckID) <> (select Top 1 GbankCommInfID from PCLAWDB_56830.dbo.GBComm ORDER BY GbankCommInfID)

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”