if statement on mysql 4.1.8
Hello!
I'm trying to do a DTS to replicate a msSQL table (let's call it table1) on a mySQL one (let's call it table2). I bring the data from msSQL to a table table2_temp in mySQL and I need to check if there are more rows in the table2_temp than in table2. If that's so, I'll delete all the data from the old table and copy the data from table2_temp to table2.
I tried to do this:
select @count_ori := count(id) from table2;
select @count_temp := count(id) from table2_temp;
if @count_ori <= @count_temp then
#delete and copy data;
end if;
It didn't work. mySQL says that I have an error near if @count_ori <= @count_temp then.....
I tried simpler ifs (i.e. if 1>0 then select @count_ori; end if;) and it didn't work either
¿Does the if statement work in this version of the server???
¿Am I doing something wrong????
Thanks already! ;) (¿is that parseable in english??)
Román
Subject
Written By
Posted
if statement on mysql 4.1.8
May 16, 2005 12:36PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.