on 03-27-2008 11:04 AM
HEllo,
I would like to know the reason behind using this query ,
SELECT * FROM <table> WHERE 1 < 0
before executing the actual SQL query.
Is there any special reason or the JDBC receiver side is configured like that.
Is there any option to overcome this process like, can we remove this option or stop using this.
Why the JDBC adapter basically sending this query on the DB?
Thanks,
Soorya,
hi!
Is it on the receiver side? Or is it a JDBC sender..
This query is used for selecting no rows. Let me explain it:
If there was a no query, error would be thrown. So you must use some. But still you don't want to start any processing. So you use this type of query.
Peter
add: this maybe also a test, if the table exists in the DB... If yes, nothing happens, if not, exception is thrown..
Edited by: Peter Jarunek on Mar 27, 2008 1:20 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
This query is executed at receiver side just before executing the original query given in the XML format.
So basically this is meant to get the meta data of the table.
So can you please have a look on this query and tell me the side effects by using such a query at DB side especially in DB2 of IBMs
Thanks,
Soorya
hi
as per my knowledge we use this qurey when we are using JDBC adapter on sender side
note:reward points if solution found helpfull.....
regards
chandrakanth.k
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if you run this query, you wont be able to see any records of the table.
SELECT * FROM <table> WHERE 1 < 0
if you run this query you will see all records
SELECT * FROM <table> WHERE 0 < 1
same with SELECT * FROM <table> WHERE 1=1
So you can check this out that whats happening in your code before executing actual query. just try to co-relate.
regards
Aashish Sinha
PS : reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
the SQL query that u r asking is used on the sender side.
Reason: this is used as indicator to specifies the processing status of each data record in the adapter (data record processed/data record not processed) to the database table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.