cancel
Showing results for 
Search instead for 
Did you mean: 

sql syntax error

Former Member
0 Kudos

Post Author: nik

CA Forum: Data Connectivity and SQL

Hi. Probably I'm missing something important but... I cannot save a sql query without getting an error:I just want to create a query like SELECT FROM Normally I write: SELECT 'field' FROM 'table' I've noticed that in CR fields are imported in this way: "table"."field" So I tried with: SELECT "table"."field" FROM "table"I tried: SELECT "field" FROM "table"I tried: SELECT field FROM tableand other... The message error gives an incorrect syntax near SELECT Someone could help me? Thank you

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Post Author: nik

CA Forum: Data Connectivity and SQL

I'm writing this query on SQL expressions editor.

I used the same syntax that I've used at database level.

So... If I've a table named customer and a field named name, It's correct something like that?:

SELECT name FROM customer

Or I've to try with:

SELECT 'name' FROM 'customer'

or

SELECT 'customer'.'name' FROM 'customer' ?

thank you

Former Member
0 Kudos

Post Author: foghat

CA Forum: Data Connectivity and SQL

Where are you writing this query? If you are writing it at the database level or within a Crystal command you don't need any quotes. the syntax crystal spits out only uses single quotes. Have you tried that? If you are still having problems, post the actual sql which is raising the error.