Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL - SELECT and IN Subquery
Message
De
01/09/2005 11:27:29
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
01/09/2005 11:19:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01045811
Message ID:
01045857
Vues:
25
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform