[AccessD] SQL Syntax Problem

artful at rogers.com artful at rogers.com
Fri Aug 4 11:04:54 CDT 2006


There are two aspects to SQL: DDL (data definition language) and DML (data manipulation language). What I was requesting was the CREATE TABLE statement that creates your table, so I can create it here and toy with your query. In the abstract I find it difficult to sort out this kind of problem. I much prefer to have an instance of the table to work against. If this table is in Access, you could simply extract that one table into a new MDB and send it to me. If it's in SQL Server, then you can generate the DDL statement directly.

----- Original Message ----
From: "Kaup, Chester" <Chester_Kaup at kindermorgan.com>
To: Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Sent: Thursday, August 3, 2006 4:50:29 PM
Subject: Re: [AccessD] SQL Syntax Problem

I must express my ignorance here. What do you mean by DDL?

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
artful at rogers.com
Sent: Thursday, August 03, 2006 3:40 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] SQL Syntax Problem

Would you kindly provide the DDL for the table so I can reproduce the
situation? No data required, just the DDL.

Thanks,
Arthur

----- Original Message ----
From: "Kaup, Chester" <Chester_Kaup at kindermorgan.com>
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Sent: Thursday, August 3, 2006 4:04:34 PM
Subject: [AccessD] SQL Syntax Problem

The following SQL gives a syntax error of compile error expected
expression when it gets to the & in this part   And ((ConfigMaster.PID)
Like '" & PID* & "')). I don't see the problem. PID is text.

 

strSQL = "SELECT ConfigMaster.PID, Count(ConfigMaster.PID) AS CountOfPID
INTO [tbl Pattern Occurances] " & _

             "FROM [tbl Producers in a Scaleup Pattern] " & _

             "INNER JOIN ConfigMaster ON [tbl Producers in a Scaleup
Pattern].ChildPID = ConfigMaster.ChildPID " & _

             "WHERE ((([tbl Producers in a Scaleup Pattern].PID)= '" &
PatternName & "' And ((ConfigMaster.PID) Like '" & PID* & "')) " & _

             "GROUP BY ConfigMaster.PID;"

 

Chester Kaup

Engineering Technician

Kinder Morgan CO2 Company, LLP

Office (432) 688-3797

FAX (432) 688-3799

 

 

No trees were killed in the sending of this message. However a large
number of electrons were terribly inconvenienced.

 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com







More information about the AccessD mailing list