Syntax Error in data validation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CVAR
    New Member
    • Jun 2016
    • 21

    Syntax Error in data validation

    Hi, I have 2 issues

    1. I have a syntax error in this instruction and can't find what's wrong, I checked and rechecked it and counted if there was a parenthesis problem but I found 4 "(" and 4 ")" so eaach parenthesis symbol has it's other part.

    2. Im building a query to test and validate that there is no collision in each of the appointments, I saw it on internet and decided to try it, since I'm building a query to validate a tables data I'm guessing it's supposed to be like an append query? How does it work?

    This is the logic:

    Code:
    NoClash: Nz(([tblAppointments_1].[AppointTime]>=[tblAppointments].[AppointEndTime]) Or ([tblAppointments_1].[AppointEndTime]<=[tblAppointments].[AppointTime]) Or ([tblAppointments].[AppID]<>[tblAppointments_1].[AppID]),False)
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    1) What is the exact error, Title, Number (if any) and description. Please post the EXACT information not abbreviations.

    Can we please see the entire SQL? It appears that you have two tables in the function and there may be an issue there.
    Open the query in design view, right click in the table area away from all tables and any relations, in the shortcut menu select "SQL View". This will show you the SQL behind the query, select it, copy to clipboard and then paste it here.
    Once the text is pasted into the post reply box, Please select the text and format it using the [CODE/] formatting tool.



    2) We do try to limit each thread to one topic :)
    However, without your full SQL we'll not know the intent. With that said, if the SQL starts with SELECT then, no, it's not an append nor an update action query.
    -Z
    Last edited by zmbd; Jul 15 '16, 12:32 AM.

    Comment

    Working...