Skip to Content
author's profile photo Former Member
Former Member

sql syntax error

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2007 at 06:13 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2007 at 10:49 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.