Multiple Set statements

  • I can do this:

    Declare @AcctNo varchar(10), @LName varchar(20), @AuthPerson varchar(20), @PUCo varchar(3)

    But is something like this not possible?

    Set @AcctNo = 1, @LName = 1, @AuthPerson = 1, @PUCo = 1

    I have a bunch, and I can't seem to figure out how to put more than one on a line to save space.

    TIA

    Paul

  • Use SELECT instead of SET.

    eg: SELECT @AcctNo = 1, @LName = 1, @AuthPerson = 1, @PUCo = 1

     

    --------------------
    Colt 45 - the original point and click interface

  • Thank you Phill, that's what I was after. I was so hung up on SET I forgot about SELECT. I'm fairly experienced in Access & VBA, but just learning how to program in T-SQL.

    Thanks again!

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

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