Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable view name - what's my best approach here?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Variable view name - what's my best approach here?
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00982834
Message ID:
00982834
Views:
53
Hi everybody,

I have the following command:
SELECT v_QuickSearch.*, ;
		IIF(EMPTY(v_QuickSearch.cResolution_Codes_Fk) OR ;
		ISNULL(v_QuickSearch.cResolution_Codes_Fk), ;
		v_QuickSearch.cStatus_Codes_Fk, ;
		v_QuickSearch.cResolution_Codes_Fk) AS cVisCodes_Fk, ;
		Employee_queue_schedules.cemployee_queue_schedules_pk, USERS.cUserID ;
		FROM v_QuickSearch ;
		INNER JOIN mmVisCollect!Trans_employees_queues ;
		ON v_QuickSearch.cTrans_PK = Trans_employees_queues.ctrans_fk ;
		INNER JOIN mmVisCollect!usgrlink ;
		ON  Trans_employees_queues.ccommission_owner_usgrlink_fk = usgrlink.cusgrlink_pk ;
		INNER JOIN mmVisCollect!Employee_queue_schedules ;
		ON  Trans_employees_queues.ctrans_employees_queues_pk = Employee_queue_schedules.ctrans_employees_queues_fk ;
		INNER JOIN mmVisCollect!USERS ;
		ON  USERS.iid = usgrlink.iuserid;
		WHERE Trans_employees_queues.iactive_flag =  1 ;
		AND  Employee_queue_schedules.iactive_flag =  1 ;
		INTO CURSOR cTempResult
But now I want to be able to use variable instead of v_QuickSearch, e.g. it could be v_QuickSearch or v_QuickSearch_PolicyNumber or v_QuickSearch_Medicaid. Would you please help me to constract such a statement? Do you think, it's better to build the whole lcSQL as a variable?

Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform