Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with SQL Query
Message
De
18/09/1999 09:58:43
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Problem with SQL Query
Divers
Thread ID:
00266315
Message ID:
00266315
Vues:
53
Hi,

I am using a Listbox to display the results of a query by means of a SQL statement. The statement is:

SELECT a.fchvence,a.hora,a.descrip,b.nombre,b.represen,b.cliente,
a.proyecto,a.reg FROM actividades AS a INNER JOIN proyectos AS b ON a.proyecto=b.proyecto INTO CURSOR curpendientes ORDER BY 1,2
HAVING a.estatus=1 and a.usuario=glbusuario and (a.clase=mClase or
IIF(mClase=4,.T.,.F.))

FIRST:
For the records in 'actividades' with a match in 'proyectos' the result is perfect and all items are listed accordingly; but when a record in 'actividades' does not have a match in 'proyectos', that item is repeated in the Listbox as many times as the total amount of records in 'proyectos'.

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. In the case above the variable is 'mClase'.

Why does this happen ?
Thanks in Advanced or Hope This Helps
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform