Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to supply list of values to be a view parameter?
Message
From
21/03/2005 13:54:41
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00997340
Message ID:
00997913
Views:
12
cSQL = [SELECT employee_queue_schedules.cTrans_Employees_Queues_fk]+;
[ FROM Employee_Queue_schedules]+;
[ WHERE cTrans_Employees_Queues_fk in (]+vp_list+[)]

nStat = SQLEXEC(nHandle,cSQL,"YourCursor")

>In VFP8 it works with
>SELECT employee_queue_schedules.cTrans_Employees_Queues_fk FROM Employee_Queue_schedules WHERE cTrans_Employees_Queues_fk in (?&vp_list)
>
>But I don't want to use macro. If I switch to SQL Server, how should I make the same select command to work?
>
>>>Hi everybody,
>>>
>>>This command works in the Command Window:
>>>
>>>
SELECT employee_queue_schedules.cTrans_Employees_Queues_fk ;
>>>FROM Employee_Queue_schedules ;
>>>WHERE cTrans_Employees_Queues_fk in ('A4D','A4C')
>>>
>>>However, I don't see a way to use ('A4D','A4C') as ?vp_List
>>>
>>>Do you know, how can I make it?
>>>
>>>Thanks in advance.
>>
>>
>>....
>>WHERE cTrans_Employees_Queues_fk in (&?vp_List)
>>
>>vp_List = ['A4D','A4C']
>>=requery()
>>
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform