Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL - SELECT and IN Subquery
Message
From
01/09/2005 11:27:29
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/09/2005 11:19:56
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01045811
Message ID:
01045857
Views:
28
>Ok.. here is real code from application
>
>		Select artikelweb.Iartnummer,;
>			artikelweb.Hersteller,;
>			artikelweb.wa_nummer,;
>			artikelweb.warengrupp, ;
>			artikelweb.art_bez1,;
>			artikelweb.artikel_nr,;
>			artikelweb.groupid2;
>			FROM artikelweb ;
>			WHERE  aktiv_teil and (Internet or into_Web) AND (Alltrim(Upper(artikelweb.Iartnummer)) ;
>			 NOT In (Select Alltrim(Upper(artikelwebsort.Iartnummer)) From artikelwebsort Where artikelwebsort.nType=2 ));
>			ORDER By wa_nummer,warengrupp;
>			INTO Cursor __NotInList
>
>
>First SQL
>
>
>		Select artikelweb.Iartnummer,;
>			artikelweb.Hersteller,;
>			artikelweb.wa_nummer,;
>			artikelweb.warengrupp, ;
>			artikelweb.art_bez1,;
>			artikelweb.artikel_nr,;
>			artikelweb.groupid2;
>			FROM artikelweb ;
>			WHERE  aktiv_teil and (Internet or into_Web) INTO CURSOR __table1
>
>
>Return 169 records...
>SET FILTER TO wa_nummer="0001" - 4 records

>
>
>Select Alltrim(Upper(artikelwebsort.Iartnummer)), wa_nummer From artikelwebsort Where artikelwebsort.nType=2 INTO CURSOR __table2
>
>
>Return 1070 records
>SET FILTER TO wa_nummer="0001" - 2 records..
>

>
>Where is losted 2 records which present in ARTIKELWEB not not in ARTIKELWEBSORT ?
>


Denis,
Check your filters like this:
browse for wa_nummer="0001"
and:
browse for trim(wa_nummer)=="0001"

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform