Karen
|
| Posted: 02/22/2002, 7:24 PM |
|
Can someone please tell me what is wrong with this query?
I am entering it in custom sql section of the for properties. I am receiving an Invalid SQL Query error message stating that "Too few parameter. Expected 1"
SELECT shipment.*
FROM shipment
WHERE shipment.ID In (SELECT ShipID
FROM AuditReport
WHERE ((Serial_Number) = (US812350)) AND ((ComID)=(1)))
|
|
|
 |
Nicole
|
| Posted: 02/23/2002, 2:03 AM |
|
Karen,
the problem usually occur when DSN connection is used. If you use a DSN connection you cannot use double double quotes (""any_val"") inside custom sql or custom code.
E.g. on Form/Properties/SQL tab in WHERE field the condition is:
status not like ""%Closed%""
it should be
status not like '%Closed%'
or in events code is something like:
sWhere = sWhere & "and DateDiff(""n"",locked,Now()) > 30"
it should be:
sWhere = sWhere & "and DateDiff('n',locked,Now()) > 30"
|
|
|
 |
Ron Borkent
|
| Posted: 02/23/2002, 5:48 AM |
|
what database are you using, sql dialects vary somewhat. I dont think MySql supports the syntax of your query, Oracle might.
|
|
|
 |
|