Ok basically what I am doing is passing a variable to a stored procedure.
This variable is a number, based on the number it updates a record. What
field is updated depends on what variable is passed. How would I go about
doing this. I have filled in the variable for testing purposes.

declare @return int
declare @entry int
exec @return = addaverage
@entry = 1

Update Users
Set [@entry] = @return
where id = 1

should do this
Update Users
Set [1] = @return
where id = 1
but of course it doesn't do this. Is there a way to do ifs in there. I am
new at this whole stored procedure thing, but I am expecting a huge traffic
site and want to take away as much as possible with processing on CF.


Bob Everland

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to