Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique identifier in SQL statement from multiple tables?
Message
From
09/05/2000 15:01:43
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00367710
Message ID:
00367775
Views:
25
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform