SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Macro combinations

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Macro combinations
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Macro combinations Reply with quote
I'd like to create a snippet that has a $PROMPT$ macro with a default value that is a result of another ($$..$$ type) macro. Is it possible to create a working version of something like this?

Code:

$PROMPT(fk_table,Foreign key holder table,$$SELECT TOP 1 s.[name] FROM Mdbo.sysobjects s WHERE   s.xtype = 'U' ORDER BY   s.crdate DESC$$)$


May I suggest implementing $OBJECT1$ and $OBJECT2$ macros? They could be very powerful when combined...
Tue Aug 17, 2010 9:53 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
I tried that and other variants and it seems to me it is not currently possible to feed results of code execution to the following or nested $PROMPT$ macro. That macro seems to be parsed and processed before the code run.

My conclusion is that nested $$.$$ or $..$ macros are not supported.
Tue Aug 17, 2010 2:37 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
$.$ macros can be easily nested inside $$.$$ ones. The only complex $.$ macro is PROMPT, but if you failed at it too, I won't experiment anymore with them.
That's a pity :( I wanted to create a series of PROMPT using snippets that could supply their defaults or a list of options that depend on table data. Would you consider that feature in a future version (if it's not too difficult to implement, of course)?
Tue Aug 17, 2010 3:47 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Thank you for your suggestions. I'm going to submit an enhancement request for that. I just don't know whether this can be done or not, I'm not sure if there are presently any technical limitations for nested macros
Tue Aug 17, 2010 5:58 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.