Start a new topic

@Export funcation not expanding ${dbvis-object}$ variable

[This topic is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

I am working on creating a SQL script to allow for repeatable export of data extracts to FlatXmlDataSet files (1 file for each table), but I am not able to get the ${dbvis-object}$ variable to expand. Note that I am working with DBVis 9.2.5 Pro against MS SQL Server database, and I have confirmed that my variable identifier prefix and suffix values are properly set to ${ and }$ respectively. Here is the script that I have assembled thus far, including the @EXPORT SET command that I am currently using. @EXPORT ON; @EXPORT SET AppendFile="clear" Destination="File" Encoding="UTF-8" Filename="C:\appdev\db-backups\extract\reference\${dbvis-object}$.xml" Format="XML" XmlStyle="FlatXmlDataSet"; SELECT * FROM dbo.Currency; @EXPORT OFF; Thanks, - Poul

[This reply is migrated from our old forums.]

Re: @Export funcation not expanding ${dbvis-object}$ variable
Hi Poul, The problem is that export to individual files is not compatible with AppendFile="clear", since "clear" means that all results should be appended to the same file (after clearing any previous results). this is from the Users Guide: --- This example shows how all result sets can be exported to a single file. The AppendFile parameter supports the following values. true The following result sets will all be exported to a single file false Turn off the append processing clear Same as the true value but this will in addition clear the file before the first result set is exported --- You can read more in: http://confluence.dbvis.com/display/UG92/Exporting+Query+Results Tol solve the problem, simply remove the AppendFile option or set it to "false". Best Regards, Hans Edited by: Hans Bergsten on Apr 9, 2015 10:31 PM
[This reply is migrated from our old forums. The original author name has been removed]

Re: @Export funcation not expanding ${dbvis-object}$ variable
Thanks. I made the change suggested (clear to false for AppendFile attribute) and it worked without issue. Thanks, - Poul