Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
jdbc: tables/columns with hypens?
- From: timm@xxxxxxxxxxxxxxxx (Tim McCune)
- Subject: jdbc: tables/columns with hypens?
- Date: Mon, 30 Aug 1999 10:29:34 -0600
Use a PreparedStatement. This lets the drivers do the necessary escaping for you. -----Original Message----- From: Mark Thornton [mailto:mThornton@xxxxxxxxxxxx] Sent: Monday, August 30, 1999 10:26 AM To: Joel Riedesel; java Subject: RE: jdbc: tables/columns with hypens? The standard SQL syntax for that is select "foo-1".customer from "foo-1" Access specific version is select [foo-1].customer from [foo-1] One of these should work, preferably the first (assuming the JDBC driver translates the quoting correctly). -----Original Message----- From: Joel Riedesel [mailto:mail21193@xxxxxxx] Sent: 30 August 1999 15:16 To: java Subject: jdbc: tables/columns with hypens? (Couldn't find a jdbc list real quick, if there is one, please point me toward it.) Is it legal to have table or column names with hypens in them? And if so, how does one reliably generate a query for them: select foo-1.customer from foo-1 I don't think hyphens are generally a good thing in SQL names, but I've run into this particular problem when using MS Access. (Trying to use a '\' to quote the hyphen seems to only generate a syntax error as well...) Thanks. -- Joel Riedesel Jnana Technologies Corporation mailto:jriedese@xxxxxxxxx 303 805 8275
- Prev by Date: jdbc: tables/columns with hypens?
- Next by Date: about URLConnection
- Previous by thread: jdbc: tables/columns with hypens?
- Next by thread: icon persists
- Index(es):