Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking up values in an array
Message
 
À
29/08/2001 06:43:45
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00550067
Message ID:
00550414
Vues:
14
Thanks for the solution Cetin, but I just realized that I am not looking for >= value, I am actually looking for the following:


SELECT DISTINCT (bdate) FROM payroll!payroll_tbl ORDER BY 1 into array a__gen1

will produce following results for me:

a__gen1[1,1] {06/17/00}
a__gen1[2,1] {07/01/00}
a__gen1[3,1] {07/15/00}
a__gen1[4,1] {07/29/00}
a__gen1[5,1] {08/12/00}
a__gen1[6,1] {08/26/00}
a__gen1[7,1] {09/09/00}
a__gen1[8,1] {09/23/00}
a__gen1[9,1] {10/07/00}


when my user inputs a date let say 08/24/00 I need a way to find the date like
08/12/00 (like a__gen1[5,1]).
when my user inputs a date like 09/12/00 I need to find date in array like 09/09/00 (a__gen1[7,1]).
when my user inputs a date like 09/23/00 I need to find date of 09/23/00 (a__gen1[8,1])

basically the code you gave me works great

SELECT top 1 bdate FROM ;
payroll!payroll_tbl ;
where bdate >= .t1.value ;
order by 1 ;
into array a__gen3



except it gives me the date greater than my input date. I need less than or equal. I tried the following code but it didn't work:

SELECT top 1 bdate FROM ;
payroll!payroll_tbl ;
where bdate <= .t1.value ;
order by 1 ;
into array a__gen3


THANKS YOU
NICK PATEL
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform