Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been able to connect to a Vertica database, and also been able to run a SELECT query. But I'm not being able to run a query with a backslash in it. (Vertica has commands like postgresql.) The command I'm trying to run is \d;. I've tried variations like below with a varying number of backslashes without success:

SQLExecute[conn, "\\\d;"]

What am I doing wrong? Any help would be greatly appreciated!

Edit: I should add that the error I'm getting is this: JDBC::error: [Vertica][VJDBC](4856) ERROR: Syntax error at or near "\" >>

share|improve this question
Three backslashes cannot be correct. Mathematica requires that each one be escaped, once, as \\. If Vertica requires an additional escape, you will have to enter four backslashes for each one you want to appear in the query. Beyond that, I have no suggestions, since I've never used this software--sorry. – Oleksandr R. Mar 27 '13 at 8:49
@OleksandrR. What is the Vertica connection string? It's native into Mathematica? – Murta Oct 22 '14 at 18:26

This is more a workaround than an answer. Schema information for all tables is also available in a table. In the case of vertica, a query like the following would get all schemas:

SQLExecute[conn,"SELECT "<>StringJoin[Riffle[columns, ", "]]<>" FROM v_catalog.columns"];
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.