Here is what I am doing and for some reason I am brain dead today.
I have a query that is like this
DECLARE @CNUM AS INT
SELECT @CNUM = CUSTMNBR FROM CUSTOMERS
SELECT AGENTNAME, STATEN, COMRATE, AGCUSTNM FROM AGENTS WHERE AGCUSTNM = @CNUM
I am only getting a single result, Is there something I am doing wrong I should get like 879 results. I know this looks stupid but I have to do it this way. I want the Result set to return for each result from the first Query.
Result like this
FRED MI .25 02325425
FRED MI .22 98783634
JIMBO IL .18 23963666
etc.
I have a query that is like this
DECLARE @CNUM AS INT
SELECT @CNUM = CUSTMNBR FROM CUSTOMERS
SELECT AGENTNAME, STATEN, COMRATE, AGCUSTNM FROM AGENTS WHERE AGCUSTNM = @CNUM
I am only getting a single result, Is there something I am doing wrong I should get like 879 results. I know this looks stupid but I have to do it this way. I want the Result set to return for each result from the first Query.
Result like this
FRED MI .25 02325425
FRED MI .22 98783634
JIMBO IL .18 23963666
etc.