Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange results of SQL
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Strange results of SQL
Divers
Thread ID:
00628504
Message ID:
00628504
Vues:
76
Hi everybody,

I have this SQL:
select Company as CustName, PcName as Contact, ;
       JobDescrip as JobName, ;
       padr(substr(JobDescrip,rat(" ",alltrim(JobDescrip))+1),30) as LastName, ;
       iif(JobType='SEXTW','1ELW','2ELM') as JobType, ;
       'Active  ' as JobStatus, Jobs.CurState as State, Jobs.JobID,    Jobs.CustID ;
       from JobControl!Jobs inner join JobControl!Customer ;
       on Jobs.CustID = Customer.CustID ;
       where inlist(Jobs.JobType,'SEXTW','SEXTM') ;
       order by 5, 1, 2,4 ; 
       into cursor ELM_ELW_Jobs
However, it produces incorrect result, e.g. job descriptions don't match their customers. Do you see anything wrong in this SQL (CustID is an Integer field and it's unique in Customer table)? Does it mean, what we have indexes' corruption?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform