Select * From LK_ORA..HR.EMPLOYEES Where Login_Date >= To_Date('2015-05-01 00:00:00','yyyy-mm-dd hh24:mi:ss') And Login_Date < TO_DATE('2015-05-02 00:00:00','yyyy-mm-dd hh24:mi:ss');
解法一:在Oracle建View,在SQL端直接讀View,但多了道建View的手續
解法二:在SQL端改用Exec,比較簡單,範例如下
EXEC ('Select * From HR.EMPLOYEES Where Login_Date >= To_Date(''2015-05-01 00:00:00'',''yyyy-mm-dd hh24:mi:ss'') And Login_Date < TO_DATE(''2015-05-02 00:00:00'',''yyyy-mm-dd hh24:mi:ss'')') at LK_ORA;
0 意見:
張貼留言