Start a new topic

Export table name missing

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

i am trying to export insert stmts for my database.

i am using it as in:
@export set filename="c:\dev\tmp\generatedsql\scripts\mssql\metadatareasoner\20\create\mss_mtr_c_dml_rootLocal.sql" appendfile="clear" format="sql" BinaryFormat="value";
select * from REASONING_SERVICE ;
select * from REASONER ;
select * from ONTOLOGY ;
select * from ONTOLOGY_CHANGE ;
etc.

however, i don't want all the rows in ONTOLOGY_CHANGE

so now, i am selecting:
select
    a.*
from
    ONTOLOGY_CHANGE as a
    inner join
        (select
            max(UPDATE_SEQUENCE_NUMBER) as UPDATE_SEQUENCE_NUMBER,
            PURI
        from
            ONTOLOGY_CHANGE
        group by
            PURI)
        as b on a.PURI = b.PURI and a.UPDATE_SEQUENCE_NUMBER = b.UPDATE_SEQUENCE_NUMBER
order by
    a.PURI;

the trouble is that during processing I get the following error message for this select:
Table name is missing or could not be determined for export in SQL format!

if i "select into ONTOLOGY_CHANGE", i get an error that ONTOLOGY_CHANGE already exists on the server and if I use any other name, the table is made but not the corresponding inserts (there are 11 rows)

how can I provide the proper table name or any table name (that i could later search and replace) so that my inserts are created for ONTOLOGY_CHANGE?


[This reply is migrated from our old forums.]

Re: Export table name missing
Tim, Thanks for your post. This has been identified as a bug an will be fixed in the next version. Regards Rogerr
[This reply is migrated from our old forums. The original author name has been removed]

Re: Export table name missing
I have a similar issue where I'm simply doing a select * from tablename where field in (select .....) and I get the same error. Might I suggest that you also allow the user to specify the table as a parameter to the @export directive which already supports many parameters. Not being able to export my data just because DBV cannot figure out the table name is a little frustrating. The bottom line for me is that if I have a query that will run let me export it's data using the @export command.
[This reply is migrated from our old forums.]

Re: Export table name missing
Robert, Try this undocumented parameter: *TableName="MyTable"* Please let me know if this is what you're looking for. Best Regards Roger