Query Assistance

Results 1 to 2 of 2

Thread: Query Assistance

  1. #1
    Join Date
    Dec 1969

    Default Query Assistance

    Hi,<BR><BR>The following query is the response.write for a select statement into an Access 2000 database.<BR><BR>SELECT Events.EventID, Events.lJournalID, Events.EventDate, lEventType.EventType, Events.EventComments, lJournal.JrnlCode FROM (Events LEFT JOIN lEventType ON Events.lEventTypeID = lEventType.EventTypeID) Left JOIN lJournal ON Events.lJournalID = lJournal.JrnlID WHERE (((Events.lJournalID) in (Select JrnlID from lJournal where lPublisherID = 3)<BR><BR>There is a syntax error in the last two lines of the query because it worked without the where clause. I would appreciate any assistance that could be provided.

  2. #2
    Join Date
    Dec 1969

    Default Just extra parentheses...

    ...so far as I can see.<BR><BR>If you count left parens and then count right parens, they don&#039;t match. Presto. You have a problem.<BR><BR>Try this:<BR><BR>WHERE Events.lJournalID in (Select JrnlID from lJournal where lPublisherID = 3)<BR><BR>I don&#039;t see why you have parens around Events.lJournalID in that WHERE clause, at all!<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts