Also, you're selecting what could be potentially multiple rows, but then assigning them to parameters... which means you'll only get one result, and it'll be the last one it finds. Additionally, it won't return anything. What it does is filling the parameters for you. So if you run it and expect to see a resultset of value in the output window, you'll be disappointed. You have to either print, or SELECT the variables to see what's in them. But zivoni is right, it isn't clear what you're trying to do exactly.


-tg