[This topic is migrated from our old forums. The original author name has been removed]
I'm using DBVis 6.0 with Sybase ASE 12.0.0.8. From the data window I highlight the rows I want exported and right click on the grid and select "Export". (The same behavior occurs when you select "Export Selection") I select SQL for the Output Format. I make the necessary selections and hit Next. I select the columns that I want exported and select Next. It then shows me the preview and I select next to export to a file or to the clipboard. The end result is not what it should be. Below you will find the result of an export from a table with 6 rows of data in it.
insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$); insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$); insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$); insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$); insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$); insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$);
Chris,
Can you please email your dbvis.xml file? It is located in:
[b]C:\Documents and Settings\\.dbvis\config\dbvis.xml[/b]
Regards
Roger
support@minq.se
a
anonymous
said
about 17 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: DBVis 6.0 exported SQL not correct
I emailed my dbvis.xml file to support@minq.se.
Thanks for the help Roger.
Roger Bjärevall
said
about 17 years ago
[This reply is migrated from our old forums.]
Re: DBVis 6.0 exported SQL not correct
Chris,
Thanks for the file.
It seems to be a mismatch in your settings. The Variable Identifier is set to ?? while all pre-defined SQLs use $$ (these are used internally by DbVisualizer).
To fix this open Tool Properties and select the Variables category. Press [b]Defaults[/b] and press [b]Revert Selected[/b] in the dialog that is displayed.
Then press [b]Apply[/b] and try again.
Regards
Roger
a
anonymous
said
about 17 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: DBVis 6.0 exported SQL not correct
That was the issue. Your suggestion corrected it for me.
Thanks for the help...
a
anonymous
said
over 16 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: DBVis 6.0 exported SQL not correct
Is there anyway to change the pre-defined SQLs to use the Variable Identifiers we setting in Tool Porperties > Variables? I noticed a while back that export and DDL creation were adversely affected by changing the variable identifiers and delimiters. I find that feature useful in itself because I have a tool which surrounds variables with #'s and the feature works, but I always have to Revert to defaults if I want to export or create a DDL.
Roger Bjärevall
said
over 16 years ago
[This reply is migrated from our old forums.]
Re: DBVis 6.0 exported SQL not correct
Scott,
The Variable identifier defined in Tool Properties is used to control the variables used by the SQL templates. So this is already the case.
Please give some more information about what you are trying to achieve.
Best Regards
Roger
a
anonymous
said
over 16 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: DBVis 6.0 exported SQL not correct
Ok, I set the variables delimiters and identifiers(#'s in this case) to an non-default values and then when I execute my own queries with those it works properly, prompting me for the variable values. When changing those in the Tool Propterties, it asks if I want to update templates and I click 'Update'. However, even after I do so, export(as SQL) and DDL functions quit working and it is clear there are pregenerated SQL templates behind those operations still have the default delimiters and I have to revert to default to get those functions to start working again.
I am using # for both the identifier and delimiter because my variables are of the form: #VariableName#
When I execute that it correctly prompts me for each value. Is there an issue with having the same value for each? I wasn't current so I just grabbed 6.0.7 and tested to confirm it is still an issue and it is.
a
anonymous
said
over 16 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: DBVis 6.0 exported SQL not correct
Ok, I tested where the delimiter and identifier symbols are different(# and | in this case respectively). DDL starts working with those, but export as SQL still has the $$ default. So having the same value of '#' for both seemed to be partly the issue, but I cannot get export as SQL to work with non-default at all.
Roger Bjärevall
said
over 16 years ago
[This reply is migrated from our old forums.]
Re: DBVis 6.0 exported SQL not correct
Scott,
Thanks for your detailed posts.
The export problem has been identified and will be fixed.
I am however unsure what you mean with DDL in this context?
Best Regards
Roger
a
anonymous
said
over 16 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: DBVis 6.0 exported SQL not correct
Roger, Thanks for the reply, glad that export issue has been identified.
With the DDL, I was seeing an error when selecting a table and going to the DDL tab in the Object View. It certainly does get an error because the SQL that results is malformed. The reason it gets confused is because I was setting both Variable Delimiter and Variable Identifier to the same exact value('#' in this case). If I only set the Identifier to that and leave the Delimiter at default(which is '||'), the DDL works fine.
I realized to get what I wanted originally, I only need to alter Variable Identifier because SQL from another tool I use represents variables as: #VariableName#
I wasn't utilizing the Variable Delimiter, so there was no need for me to change it from the default. It may be obvious that you shouldn't set Delimiter and Identifier to the same value, but I didn't notice it because I wasn't using it my queries. Now that I know that I only need to change the identifier, I should be fine. Thanks, Scott
anonymous
insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$);
insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$);
insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$);
insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$);
insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$);
insert into $$schema$$$$schemaseparator$$$$table$$ ($$columns$$) values ($$column-values$$);