Thursday 15 April 2010

how to solve this error in oracle and in mysql -


I have this problem where in my class it was saying that this is an invalid SQL statement. Rowname is datetime if there is something wrong in my statement that I can not understand that you guys can help me ... thanks

Note: I want to convert my code to a very clean version Hope you guys can help me (I have a selected query in two tables)

Where

  IF tbl1.last_update_date is the last_fill_data is zero If max end (tbl1.last_update_date) ELSE min (tbl2.last_update_date); And    

if is not part of the syntax Select Statement is part of the language at this high level, therefore, you can not include it in the where statement. You want to do something like this:

 < Code> where rowname & gt; = COLLACES (Select the maximum from tbl1), (select from tbl2 to min (rowname)), rowname) and sysdate   

In addition, sysdate is an Oracle definition MySQL will usually use now () to support both ANSI standard CURRENT_TIMESTAMP .

No comments:

Post a Comment