SqlDbx Forum

SqlDbx

You are not logged in.

#1 2010-02-18 15:28:59

Rag_veer
Member

UDB SUB SELECT QUERY NOT VALIDATED

Ran a query with sub select (having wrong field name) the query ran gave results without error. The subselect is ingnored.

Ex: Select F1, F2, F3 from T! Where F1 in (SELECT F11 from T2).

Here there is a typo in F11 supposed to be F1 but the query ran by ignoring the sub select.

Offline

#2 2010-02-18 18:26:05

maac2002
Member

Re: UDB SUB SELECT QUERY NOT VALIDATED

It's simply an user' error. Syntactically it's ok, and 'F1'
is not restrictively forced to be such value.
This type of situations cannot be validated,
e.g. how guess if, in effect, F11 is the desired value?

Last edited by maac2002 (2010-02-18 18:29:18)

Offline

#3 2010-02-18 23:36:19

sqldbxhelp
Administrator

Re: UDB SUB SELECT QUERY NOT VALIDATED

You should get an error.
First I assume that T! is T1.
Second: here's the error I get
SQL0206N  "F11" is not valid in the context where it is used.  SQLSTATE=42703

What version of database you connect?

Offline

#4 2010-02-20 13:46:46

Rag_veer
Member

Re: UDB SUB SELECT QUERY NOT VALIDATED

Yes it is T1. UDB 9.5. Similar query in Sybase gives error. If u use ODBC query tool it also gives error. But SQLDBx latest free edition is not giving errors and giving results.

Offline

#5 2010-02-20 20:49:51

sqldbxhelp
Administrator

Re: UDB SUB SELECT QUERY NOT VALIDATED

Something is not right here.
SqlDbx is not doing anything, it just passes SQL statement to database server.
Every version of UDB I tried on returns an error and I do not see how it is
possible for server to return any results in this case.

Offline

Board footer

Powered by FluxBB