I want to do something as shown below, but when I do it seems to take forever to action and I can't figure out why :
self.cursor.execute('update '+DB_NAME+'.tableOne, '+DB_NAME+'.tableTwo,\
SET variable=CASE \
WHEN variable+1> 100 THEN 100 \
ELSE variable+1\
END \
WHERE tableOne.variableTwo>0 AND tableTwo.variableOne>0;')
The statement is a little different obviously but that's the principal of what I want to do.
I want to update a table with a set/case/else/where and have two different tables in the where clause... It does action the update, but it takes ten to fifteen seconds to perform instead of the milliseconds if I remove the second table.
Any help would be appreciated.
2007-03-27
04:17:58
·
1 answers
·
asked by
just_another_user
3
in
Computers & Internet
➔ Programming & Design
I've sorted it.
Never mind.
2007-03-27
04:26:09 ·
update #1