Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prblems with subquery

Status
Not open for further replies.

deangelis

Programmer
May 13, 2003
54
ES
Hi,
The problem is that i've to specified two fields before the IN.
This is the code in VB:
"SELECT trajectory_id, traj_type, att_time FROM TRAJ_SCENARIO WHERE scenario_id = '"& _
scenarioName & "~bak' AND ((trajectory_id, att_time) NOT IN (SELECT trajectory_id, att_time from" & _
" TRAJ_SCENARIO WHERE scenario_id = '" & scenarioName & "~bak' and trajectory_id = '" & _
TrajName & "' and att_time = " & AttTime & ")) ORDER BY trajectory_id"

The error is on the ",".
The question is:
Is it possible to specify two fields before the NOT IN statement????

Ciao da
N@poleone
 
In ANSI SQL yes. So this seems to be a limitation of your DBMS. You can rewrite it uisng not exists.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top