Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
paresh1
Contributor III
Contributor III

execute oracle sql query file

Hi,

 

First of all I am new to Talend.

I am trying to execute Oracle sql query file which has simple query as select * from schema.tablename;

 using tFileInputFullRow--->tOracleRow(query--->(String)globalMap.get("line"))----->tFileOutputExcel.

 

Getting error as SQL statement to execute cannot be empty or null

I have attached the screenshot of job.

 

Please help in the above issue.

 

Thanks

 

Labels (3)
1 Solution

Accepted Solutions
David_Beaty
Specialist
Specialist

Hi,

 

You probably need to go:

tFileInputFullRow ->tSetGlobalVar ("line" = row1.line" or something similar

 |

V

tOracleRow (String)globalMap.get("line")

 

View solution in original post

7 Replies
David_Beaty
Specialist
Specialist

Hi,

 

You probably need to go:

tFileInputFullRow ->tSetGlobalVar ("line" = row1.line" or something similar

 |

V

tOracleRow (String)globalMap.get("line")

 

David_Beaty
Specialist
Specialist

Hi,

 

You probably need to go:

tFileInputFullRow ->tSetGlobalVar ("line" = row1.line" or something similar

 |

V

tOracleRow (String)globalMap.get("line")

 

paresh1
Contributor III
Contributor III
Author

Hi David,

 

Thanks for the solution.

Now that error has vanished.

It came up with new error "ORA-00900: invalid SQL statement".

Also tried by giving schema name too.

0683p000009MaN3.png0683p000009Ma0Z.png

paresh1
Contributor III
Contributor III
Author

Hi David,

 

Thanks for the solution.

Now that error has vanished.

It came up with new error "ORA-00900: invalid SQL statement".

Also tried by giving schema name too.

0683p000009MaN3.png0683p000009Ma0Z.png

Anonymous
Not applicable

Do not add the ; at the end of the statement.

The semicolon is not part of the statement and will only be used to separate multiple statements in tools like DBeaver or SQLPlus. The database it self expects the single statement without ; 

Oracle does not allow multiple statements in in JDBC statement unlike MySQL (here you can execute multiple statements at once).

Anonymous
Not applicable

Do not add the ; at the end of the statement.

The semicolon is not part of the statement and will only be used to separate multiple statements in tools like DBeaver or SQLPlus. The database it self expects the single statement without ; 

Oracle does not allow multiple statements in in JDBC statement unlike MySQL (here you can execute multiple statements at once).

paresh1
Contributor III
Contributor III
Author

Thanks a lot jlolling and David. Both of your answers helped me to get out of the issue.👍 👌