Morning all,

I'm getting undesirable results with a stored proc, the suspect part of
which is very much like the following;



Update tblBlah
Set Field1 = 1  
where someID = @someID and someID in ( select sometherID from tblBlah2 where
anotherID = @anotherID);



The problem is, the subquery that is inside the in clause is returning a 5
character varchar field which happens to contain all digits, like so: 

14278,95478,01247,01457

These values are ALL stored as varchars whereever they are used, nowhere in
the database are they numeric.

SQL seems to be treating these as ints and chopping any zero's of the front,
hence any records which have a coresponding value whcih begins with a zero
are not being updated.

Is there any way I can program the stored proc so it knows that the subquery
will be returning varchar values ?

Thanks for any help.

______________________________________________________________________
Macromedia ColdFusion 5 Training from the Source
  Step by Step ColdFusion
  http://www.amazon.com/exec/obidos/ASIN/0201758474/houseoffusion
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to