Has noone else seen this before?

-----Original Message-----
From: Morphis, Greg
Sent: Friday, June 04, 2004 12:40 PM
To: CF-Talk
Subject: Funky CF Error

A friend and I were working on this page yesterday...
We were getting this "not a valid number" error.. The code worked fine when written and ran straight from Toad.
We both looked at the code puzzled for a few minutes.
My friend commented out a line using the CF "where a.loctype='#thisLoctype#'" statement
and below it wrote the line using the literal value of the statement (w/o the cf statement) "where a.loctype = 'RET'".
The page worked fine. Then he commented out the top literal line and uncommented out the
CF line... The code worked.
Then he removed the commented out literal line, the page wouldn't load giving the same error.
We added back the commented line and the code works fine.
Have you ever seen anything like that?
Below is the code...

select i.itemid, i.itemname, i.seltype, i.useqty,
nvl2(d.itemid,d.value,i.dfltvalue) as value,
nvl(d.qty,1) as qty,
nvl(d.seq,1) as seq,
max(nvl(d.seq,1)) over (partition by i.itemid) as maxseq
from items i, item_appliesto a,
(
select itemid, seq, value, qty
from item_data
where loctype='#thisLoctype#'
and locid=<cfqueryparam value="#url.locid#" CFSQLType="CF_SQL_VARCHAR">
) d
where a.loctype='#thisLoctype#'
--where a.loctype = 'RET'                   <-- if this line is removed, the code stops working, giving invalid number error.
and i.itemid = a.itemid
and i.enabled='1'
and d.itemid (+) = i.itemid
order by i.itemid, nvl(d.seq,1)

Greg Morphis
Rapid Response Team
Client Server Dev/Analyst I
Armageddon Programmer/Support
Desk: 501/905-2881
Cell: 501/529-3691

******************************************************************************************
The information contained in this message, including attachments, may contain
privileged or confidential information that is intended to be delivered only to the
person identified above. If you are not the intended recipient, or the person
responsible for delivering this message to the intended recipient, ALLTEL requests
that you immediately notify the sender and asks that you do not read the message or its
attachments, and that you delete them without copying or sending them to anyone else.
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to