mercredi 6 juillet 2016
Can't make view from multiple table
I'm trying to learn about view in SQL. In my case, i can't execute statement to create view. Here is the statement:
CREATE VIEW VTOTALMINUTESEMPLOYEE (EMPL_KODE, EMPL_NAME,DATE_IN, TIME_IN, TIME_OUT, HASIL)
    SELECT 
    EMPLOYEE.EMPL_KODE, 
    EMPLOYEE.EMPL_NAME, 
    ATTANDENCE.DATE_IN, 
    ATTANDENCE.TIME_IN, 
    ATTANDENCE.TIME_OUT,((TIME_OUT-TIME_IN)/60) AS "RESULT" 
    FROM EMPLOYEE 
    JOIN ATTANDENCE 
    ON EMPLOYEE.EMPL_KODE=ATTANDENCE.EMPL_KODE
This is the errror code  :
SQL Message : -104
Invalid token
Engine Code    : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -104
Token unknown - line 2, column 9
SELECT
What's wrong with my code ? is there a thing that i missed ? i run the code with flamerobin. please help.
Edit: I get following error:
  -104 Invalid token Engine Code : 335544569 Engine Message : Dynamic SQL Error SQL error code = -104 Token unknown - line 2, column 9
  SELECT
Inscription à :
Publier les commentaires (Atom)
 
Aucun commentaire:
Enregistrer un commentaire