tom taol
3/29/2007 3:53:00 PM
I need to create a stored procedure thats take a parameter, then within that
stored procedure I need to run a select statement based on a different
parameter.
so I need to do something like this
select customersID from custTable where custname = @custname
then I need to take that customerID and do this
if @@rowcount = 0
'' i need to exit the stored procedure
else
'do this
select salesprice, make, model, year, salesman from salesTable where custId
= customerID
'then i need to end the stored procedure
then return that data to the screen, how can i accomplish this in a stored
procedure