subquery doesn't work

Post Reply
chand012
Posts: 70
Joined: Mon Dec 18, 2000 4:34 pm

subquery doesn't work

Post by chand012 »

Three tables: tblA, tblB, tblC
Indexes:
tblA(colA) - unique
tblB(colB) - unique
tblC(colA, colB) - unique
tblC(colB) - normal

This query works:
"select * from tblA where colA not in (select colA from tblC where colB = $colB)"

This on doesn't:
"select * from tblB where colB not in (select colB from tblC where colA = $colA)"

Why?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

subquery doesn't work

Post by John »

Which version of Texis are you using?

In what way does it not work?

Are all the cols the same type? What types are they?
John Turnbull
Thunderstone Software
chand012
Posts: 70
Joined: Mon Dec 18, 2000 4:34 pm

subquery doesn't work

Post by chand012 »

Texis version: Commercial Version 3.01.959738425 of May 30, 2000 (sparc-sun-solaris2.5.1)

The query doesn't work in that when the subquery returns no rows (as expected), the main query returns no rows instead of all rows.

Data types:
colA - varchar (both tables)
colB - counter (both tables)
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

subquery doesn't work

Post by John »

John Turnbull
Thunderstone Software
Post Reply