February 9, 2004 at 5:09 am
Hello!
Having problems with a query(SP) here.
I was trying to check if a value is NULL (Divide by null), but I can't make it work.
Here is my code;
declare @UnitWeight as Real
set @UnitWeight = 1
SELECT SUM(FVALUE) as fVal from ITEM
SET @UnitWeight = fVal //Here I get an error saying: "Invalid column Name 'fVal'
Can anyone help me please
-Lars
Please only reply to this newsgroup. All mails would be bounced back.
February 9, 2004 at 5:48 am
Hi Lars,
Below is the corrected syntax.
declare @UnitWeight as Real,
@fVal as Real
set @UnitWeight = 1
set @fVal=0
SELECT @fVal=SUM(isnull(FVALUE,0)) from ITEM
SET @UnitWeight = @fVal
Pls check it out.
Nitin
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy