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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stored procedure doesnt work

Status
Not open for further replies.

ajde12

Programmer
May 14, 2003
6
CY
Hi there,
I have sp which is "god looking" but doesnt work
....any time when I put number for input i Have sum "null"

CREATE PROCEDURE sp_pera
@myInput varchar
AS
SELECT SUM(CustFinTrxnLoyalPoints)
FROM CUSTOMERFINTRANSACTIONS
Where CustAccCardNum = @myInput
GO

CustAccCardNum is varchar in table
CustFinTrxnLoyalPoints is float

thanks
 
<deja vu>
varchar how many?
</deja vu>

And CustAccCardNum is of type...?

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
CustAccCardNum -type of field is varchar
CustFinTrxnLoyalPoints-type of field is float

 
I mean length - varchar without explicitely declared length is probably the reason why sproc doesn't work.

Make it to match length of CustAccCardNum field (varchar(20) or whatever it is).

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
yes
you have right now is ok

thank you very much
have nice day
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top