select switch,switch||'-'||tkg_name as tkg_name,(date_time - to_date('01-JAN-1970','DD-MON-YYYY')) * (86400)as date_time,percent_occupied from Table_name where tkg_name in ('AB65UT','LIY870','IUY890') and
trunc(date_time) between '21-DEC-11' and '27-DEC-11';
trunc(date_time) between '21-DEC-11' and '27-DEC-11';
I also like to know how to escape the single quotes in the SQL statement.
This SQL statement runs perfectly in Oracle SQL Developer
I already got the connection to the database working and can run simple SQL scripts on it.
Help will be very much appreciated.
i found a way of doing this by
cur.execute(""" select ....""")
Kaf