SELECT Empty value on first record

  • I have the following query that selects certain amount of records. Is it possible to have the first record as an empty string without creating a temporary table?

    SELECT AccountID, AccountName

    WHERE AccountID Between 1 AND 100


    Kindest Regards,

  • SELECT '' as AccountID, '' as AccountName

    UNION ALL

    SELECT convert(varchar(20), AccountID), AccountName

    WHERE AccountID Between 1 AND 100

    ORDER BY AccountId

    _____________
    Code for TallyGenerator

  • Thanks sergiy. I knew there was some way to do it without a temp table.


    Kindest Regards,

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply