Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Appending a field to a Select. Possible?

Status
Not open for further replies.

mpdinosaur

Programmer
Aug 13, 2003
21
0
0
US
Folks;

Is is possible to append a uniquely-valued field to a data set? What I'd really like to do is add a serialized (1, 2, 3, 4, etc.) or even randomized field as the last field in my result data set using an SQL stored procedure.

I'd like my result to be:

MachA ProdX 1
MachA ProdY 2
MachB ProdX 3
MachC ProdX 4
MachC ProdY 5
MachC ProdZ 6
.
.
.

As usual, thanks again in advance for your help.

Mike [bigears]
 
Easiedt is to put it into temp table with an identity.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top