1
I need to recover the quantity of product with price between 0 and 10. Error in variable @W_NUM of select command.
BEGIN TRANSACTION;
DECLARE @W_P1 int;
DECLARE @W_P2 int;
DECLARE @W_NUM int;
set @W_P1=0;
SET @W_P2=10;
SET @W_NUM=0;
BEGIN
WHILE (@W_P2<300)
SELECT COUNT(P_CODE)INTO @W_NUM FROM PRODUCTT WHERE P_PRICE>@W_P1 AND P_PRICE<@W_P2;
PRINT('EXISTEM'+@W_NUM+'PRODUTOS COM O PRECO ENTRE'+@W_P1+' E '+@W_P2)
@W_P1=@W_P1+1;
@W_P2=@W_P2+50;
END
COMMIT
what error you receive?
– Italo Rodrigo
Also check if your table calls even
PRODUCTT
with 2T
– Sorack
IN ENCRYPTION @W_P1=@W_P1+1; @W_P2=@W_P2+50;
– Orlando
But what is the error message/code?
– Ricardo Pontual
@OrlandoCawende http://answall.com/help/question-bans
– Maniero