on 11-09-2010 11:48 AM
Hi,
How to save a SQL query template in my server as a Text file?? I tried using Text saver but it is not getting saved in the path specified.
Sweety
Hi,
you really want to save the query template ? Or the query results?
Have you checked if the input to the text saver is correct? And the output path is correct?
Are there any errors when executing the text saver action?
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are trying to save the sql script as a text file, use the query property of the SQL Query action block and map it to the Text Saver action block. If you are trying to store more information, perhaps concatenating the properties using some sort of delimiter or field name (preceding the contents) would also work.
Regards,
Mike
Hi Sweety,
In the transaction editor (for business logic), add your query template to a transaction. Add a Tracer after and link the Query property of the SQL Query action block to the Message property of the transaction. Run the transaction and you will see your Action Block's sql script as the message from the Tracer. You can do the same with the Server property, SD and ED, etc.
Also if you wish to dynamically load the sql script into the query, you can do that at run time by linking a script source to the query property. Useful to have if you have to use a complex expression to dynamically create your script. This sometimes occurs when you have multiple filtering inputs from a webpage and you can reduce the number of tables in a complex join when the fields are left empty. Normally this would be done as a way to improve the performance of the query.
Hopefully this is clear. If not I can probably provide some sample expressions.
Regards,
Mike
I have one question what is your use case/reason for doing this? Are you trying to build some type of content mgmt system or save backups or your content? If so in version 12.1 MII can use NWDI for this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sweety,
You can save the results either way, but without doing post processing, it will be in an xml format. So the tags will come along with the data. If you wish you can extract the data and put it into some other format (csv, for example), but if you work much with MII, you will quickly get used to working with xml data. It is the native data format used within MII.
Regards,
Mike
User | Count |
---|---|
12 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.