Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique identifier in SQL statement from multiple tables?
Message
De
09/05/2000 15:01:43
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00367710
Message ID:
00367775
Vues:
24
Hi again Nadya.

As I said before SYS(2015) won't work for you if you need an integer result.



Here is a simple (and somewhat lazy) function to do the same thing:
FUNCTION unlocalkey

LOCAL lc,lcout
lc=SUBST(SYS(2015),2,9)
lcout=""
FOR i=4 TO 9
	lcout=lcout+ALLTRIM(STR(ASC(SUBSTR(lc,i,1)),3,0))
NEXT
RETURN INT(VAL(lcout))
It produces rather long results. The numbers should be unique for the cursor produced, provided the query does not take more than a few minutes to run.
This would not be a good thing to do against a shared table (shared in the sense that multiple people were adding records to it at the same time).
Thanks

Gar W. Lipow
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform