Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use this in select - SQL
Message
From
30/03/2006 13:31:07
 
 
To
30/03/2006 13:27:27
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01108273
Message ID:
01109284
Views:
28
>>>>IF USED('myTable')
>>>> SELECT ('myTable')
>>>>ELSE
>>>> SELECT 0
>>>>ENDIF
>>>>USE myTable
>>>
>>>
>>>USE myTable IN IIF(USED('myTable'), 'myTable', 0)
>>>
>>
>>Even simpler
>>USE myTable IN select('myTable')
>
>Even simpler :)
>
>
>USE myTable IN myTable
>
>
>But more dangerous if somthing is open in current workarea.

My version is always safe, unless mytable is used alias something other than mytable.
Previous
Reply
Map
View

Click here to load this message in the networking platform