Easy SQL Syntax Question

Easy SQL Syntax Question

Post by Rorynat » Fri, 17 Jul 1998 04:00:00



I have the following Querry in code:

Set rstSQLRecord = dbsData.OpenRecordset("Select Credit Limit from _
CustomerInfo WHERE Customer!CustId = CustomerInfo!CustomerId and _
Customer!CustomerName = list1.text ")

Every time I run the above code, I get the error

Run-Time error '3075'
Syntax error (missing operator) in querry expression 'Credit Limit'.

I can not figure out how to make this work.  Any Suggestions would be greatly

Thank you for any help you can give.

The Rorynater
Rory Latham

 
 
 

Easy SQL Syntax Question

Post by Thomas Kroje » Fri, 17 Jul 1998 04:00:00


Hello Rorynater,

What I see is that you have a field with a space in it, you should use a
pair of [ ] around Credit Limit, in the actual case it should be: [Credit
Limit]

bye, Thomas

Rorynater schrieb in Nachricht

>I have the following Querry in code:

>Set rstSQLRecord = dbsData.OpenRecordset("Select Credit Limit from _
>CustomerInfo WHERE Customer!CustId = CustomerInfo!CustomerId and _
>Customer!CustomerName = list1.text ")

>Every time I run the above code, I get the error

>Run-Time error '3075'
>Syntax error (missing operator) in querry expression 'Credit Limit'.

>I can not figure out how to make this work.  Any Suggestions would be
greatly

>Thank you for any help you can give.

>The Rorynater
>Rory Latham



 
 
 

Easy SQL Syntax Question

Post by Wasudeo Mhaska » Fri, 17 Jul 1998 04:00:00


This is how your query should look

Set rstSQLRecord = dbsData.OpenRecordset("Select Credit Limit from
CustomerInfo WHERE Customer!CustId = CustomerInfo!CustomerId and
Customer!CustomerName ' = " & list1.text & " ' ")

  vcard.vcf
< 1K Download
 
 
 

Easy SQL Syntax Question

Post by Carl Brin » Mon, 20 Jul 1998 04:00:00


Well  both of you are close

Set rstSQLRecord = dbsData.OpenRecordset("SELECT [Credit Limit] from
CustomerInfo WHERE Customer!CustId = CustomerInfo!CustomerId and
Customer!CustomerName  = '" & list1.text & "' ")

                                                    ^
^
                                                <sq><dq>
<dq><sq><dq>

Gotta watch those spaces and quotes.

I would also suggest if at all possible not to use database field name with
spaces... makes you job a whole lot harder.


>This is how your query should look

>Set rstSQLRecord = dbsData.OpenRecordset("Select Credit Limit from
>CustomerInfo WHERE Customer!CustId = CustomerInfo!CustomerId and
>Customer!CustomerName ' = " & list1.text & " ' ")

 
 
 

1. Easy SQL Syntax Question

I have the following Querry in code:

Set rstSQLRecord = dbsData.OpenRecordset("Select Credit Limit from _
CustomerInfo WHERE Customer!CustId = CustomerInfo!CustomerId and _
Customer!CustomerName = list1.text ")

Every time I run the above code, I get the error

Run-Time error '3075'
Syntax error (missing operator) in querry expression 'Credit Limit'.

I can not figure out how to make this work.  Any Suggestions would be greatly

Thank you for any help you can give.

The Rorynater
Rory Latham

2. Help: Name confusion.

3. Newbie - Easy (I think) SQL Syntax Question, 3 table join

4. Query Recordset, Create Summary/New Recordset

5. Easy question on trigger syntax....

6. SQL query question

7. NEWBIE: easy syntax question with UPDATE statement

8. setup of import of a access file to sqlserver2000

9. Probably easy syntax question

10. Easy SQL Syntax Problem- HELP!!

11. Give this newbe easy answers on easy questions!

12. Old Article: Access SQL syntax versus Transact SQL syntax

13. SQL Plus PL/SQL Syntax Question