Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Repeated Items with SQL Statement
Message
De
16/09/1999 17:25:59
 
 
À
16/09/1999 17:23:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00265673
Message ID:
00265676
Vues:
16
Hi Antonio ---

Try posting the actual query. Your answers may depend on what conditions 1 and 2 are.

>
>I am using a Listbox to display the results of a query by means of a SQL statement. The form of the statement is:
>
>SELECT (field1),(field2),(field3) FROM (tableX) AS (X) INNER JOIN (tableZ) AS (Z) ON (condition1) INTO CURSOR (curSample) ORDER BY (1,2) HAVING (condition2)
>
>FIRST:
> For the records in tableX with a match in tableZ the result is perfect and all items are listed accordingly; but when a record in tableX does not have a match in tableZ, that item is repeated in the Listbox as many times as the total amount of records in tableZ.
>
>Which is the reason for this behaviour and how can I fix this situation ?
>
>SECOND:
>If I declare a Public variable in the form that contains the Listbox object and use it as part of condition2 I get the following error message: Column Not Found in SQL. The only way it works is declaring the same variable Public in the main program. Note that in both cases the variable is initialized in the Init method of the Listbox.
>
>Why does this happen ?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform