Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass-through character limits?
Message
From
08/12/1998 10:03:25
 
 
To
08/12/1998 10:00:22
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00164772
Message ID:
00165067
Views:
16
>Hmmmm....
>
>I was thinking of something along the lines of the following:
>
>SELECT @sqlstatement = sqlholder.sqlstatement
>CREATE PROCEDURE sp_tempwork AS @sqlstatement
>
>I dunno if this would work...do you?

me too :). My guess is if some intermediate table will be involved anyway, then you could utilize two or more records of this table and then call stored procedure with few parameters (record ids).

>>
>>The problem is that macro substitution is not supported on SQL. Am I right here?
>>
>>>Hi Don ---
>>>
>>>What a cool, novel idea! So, have a table with a memo field, write the SQL to that memo field and then have the back-end process it as a stored procedure? Interesting. What you could have on the SQL Server end is an sp_ where it opens the record and does the SELECT statement from that setup table using a variable to represent the entire text and then passes the cursor back when called from SQLEXEC in VFP. I don't see why that wouldn't work.
>>>
>>>>
>>>>I had one other idea after the UT crashed yesterday... (had major problems staying connected). Is it possible to do something similar to a macro substitution in SQL like in VFP with the use of the &?
>>>>Ex: lcTable = "employee"
>>>> use &lcTable
>>>>
>>>>My thought was to create a table with an ID and a text field (compatible with VFP memo field). Then I could create a view on the front end, add a record with the full string desired and commit the record to the back end... Then with that ID assigned, I could call a stored procedure on the back-end and select the value from the text into a variable and execute from there? Is this possible?
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform