Hi all!
Could please someone help me with the following problem. In database I have
a table that I need
to export into CSV format.
If I use these lines
try {
Export.exportQuery(conn,"SELECT * FROM XYZ", "c:/export.txt", ",", "\"",
"iso-8859-2");
} catch (Exception e) {}
I get the data in table in CSV format. However, this is only data in table
without table header (of
course, based on SQL statement).
So, if I use these lines (I guess that exportTable returns also the table
header)
try {
Export.exportTable(conn, null, "XYZ", "c:/export.txt", ",", "\"",
"iso-8859-2");
} catch (Exception e) {}
I get the following exception:
SQL Exception: Table 'XYZ' does not exist.
With lines
try {
Export.exportTable(conn, null, "abc.XYZ", "c:/export.txt", ",", "\"",
"iso-8859-2");
} catch (Exception e) {}
I get the following exception:
SQL Exception: Table 'abc.XYZ' does not exist.
And, with lines
try {
Export.exportTable(conn, "abc", "XYZ", "c:/export.txt", ",", "\"",
"iso-8859-2");
} catch (Exception e) {}
I get the following exception:
SQL Exception: Schema 'abc' does not exist.
What should I use? And, additional question: does exportTable returns also
table
header?
Thanks in advance!
Andrej