Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indirect join
Message
De
20/11/2006 13:27:53
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
20/11/2006 13:22:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01171237
Message ID:
01171242
Vues:
7
>The following code sequence will work fine
>
>lcRawData = addbs(fileloc) + "surveys/RawData2005"
>rawdata = 'RawData2005'
>lcPermID = '20011'
>lcJoincondition = 'Companyinfo.company = RawData2005.company'
>
>SELECT Companyinfo.*, (lcRawData + '.*');
> FROM ;
>     COMPANYINFO ;
>    INNER JOIN (lcRAWDATA) ;
>   on Companyinfo.company = RawData2005.company ;
> WHERE  Companyinfo.permid = ( "20011" )
>
>
>but this one will not
>
>
>lcRawData = addbs(fileloc) + "surveys/RawData2005"
>rawdata = 'RawData2005'
>lcPermID = '20011'
>lcJoincondition = 'Companyinfo.company = RawData2005.company'
>
>SELECT Companyinfo.*, (lcRawData + '.*');
> FROM ;
>     COMPANYINFO ;
>    INNER JOIN (lcRAWDATA) ;
>   on Companyinfo.company = (lcRawData + '.company') ;
> WHERE  Companyinfo.permid = ( "20011" )
>
>
>The construct fails with the indirect pointer in the 'ON' statement. I've tried every combination of (), "", and & that I can think of but can't seem to make it work. The query will run without error but it doesn't find any records. Any help will be greatly appreciated.

Don,
Use evaluate() or &.

A better one (w/o evaluate):
SELECT * ;
 FROM ;
     COMPANYINFO t1 ;
    INNER JOIN (m.lcRAWDATA) t2 ;
   on t1.company = t2.company ;
 WHERE  t1.permid = ( "20011" )
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