View Single Post
 
Old April 21st, 2009, 10:14 AM
gbianchi gbianchi is offline
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

You need a query here, no SP to work with.

The first post in that thread show you a table (that is used for example, and looks like your table), then there are 3 querys that do the same thing, with different aproach.
You pick any of the 3 querys you see, and replace @Sample with your table name, and the fields (id, code) with your own fields and you are ready to go.

Try it to see if you got the expected output.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
The Following User Says Thank You to gbianchi For This Useful Post:
lryckman (April 21st, 2009)