Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Syntax for Subsetting
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00569737
Message ID:
00569743
Vues:
24
This message has been marked as a message which has helped to the initial question of the thread.
>I am trying to build a summary view based on a lot of status info.
>In the original table, I have multiple rows with varying iQueueID values, and cStatusDesc can be any number of things. I just want the rows where there is only 1 entry and it is 'File added to the queue. Ready for processing'. In the original table, only 1 row satisfies this condition, but I seem to be getting that 1 row and also rows that have 'File added to the queue. Ready for processing' and other values as well.
>
>
Select Count(*) as iCount , iQueueID , 'Submitted' as cSummaryStatus
>from AppQueueStd
>Where cStatusDesc='File added to the queue.  Ready for processing.'
>Group By  iQueueID , cTPAID , cSubmittedBy , tCreateDt
>Having Count(*)=1
>
>?
Select iQueueID , 'Submitted' as cSummaryStatus ;
  from AppQueueStd ;
  Where cStatusDesc='File added to the queue.  Ready for processing.' ;
     And  iQueueID Not In ( ;
        Select iQueueID ;
         from AppQueueStd ;
         Where cStatusDesc<>'File added to the queue.  Ready for processing.' )
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform