Skip to content
Advertisement

Tag: jet

How to terminate SQL statements when using DEFAULT value and OleDB?

Using C# and the JET OleDB driver (Microsoft.Jet.OLEDB.4.0) to connect to an old Access database (think Access 97). The following SQL statements work fine: But terminating the statement with a semi-colon (;) causes problems: Can SQL statements with DEFAULT be terminated? Answer Default values can (and probably should) be quoted using double quotes to avoid these errors, among others: Note

Multiple LEFT JOIN in Access

I have the following query, which works for MySQL: But it doesn’t work for MS Access. I’ve tried to add parentheses around the LEFT JOIN, but it gives me syntax error in FROM clause. So how should this query look in order to work in MS Access? Answer The Access DELETE requires a star (*): DELETE * FROM … In

Table-less UNION query in MS Access (Jet/ACE)

This works as expected: This fails with the error “Query input must contain at least one table or query”: Is this just a quirk/limitation of the Jet/ACE database engine or am I missing something? Answer You didn’t overlook anything. Access’ database engine will allow a single row SELECT without a FROM data source. But if you want to UNION or

Advertisement