Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server Select Statement
Message
 
À
21/07/2005 11:21:34
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01034265
Message ID:
01034686
Vues:
21
Stephen,
I don't understand why you need judje code when you have pkeyident? From the data you post pkeyident in Payments is matching keyindent field from other tables, is that so?
If it is:
SELECT *  from Payments
       WHERE py_paydate BETWEEN "2005/01/01 00:00:00" AND "2005/12/31 23:59:00" AND
            pKeyIndent == '1' && For MV, 2 FOR SC etc.
>Ok this is what I need to do
>
>I have a payments table where I want to select a payment date range and select for a specific judgecode. The judge code could come from up to 5 different tables here are the table sturctures and some values
>
>payments
>py_paydate py_module pkeyident
>'01/01/2005' 'MV' '1'
>'02/01/2005' 'SC' '2'
>'04/01/2005' 'CRM' '3'
>'04/01/2005' 'LL' '4'
>'01/01/2005' 'CV' '5'
>
>MV
>keyident mv_judge
>'1' 'MMM'
>
>SC
>keyident sc_judge
>'2' 'LLL'
>
>LL
>keyident ll_judge
>'4' 'LLL'
>
>CRM
>keyident crm_judge
>'3' 'AAA'
>
>CV
>keyident sc_judge
>'5' 'LLL'
>
>where py_module determines which module the payment came from
>
>so in my select statement I want to select all payments
>from 01/01/2005 - 12/31/2005 with judge code ='LLL'
>
>Hope this helps explain what I am trying to do a little better !
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform