• Syntax error (2002)

    Author
    Topic
    #437016

    I’m getting Syntax error (missing operator) when running the following inside a SQL string in VB Code:

    StrConv([RANK] & “” “” & [FNAME] & “” “” & IIf(IsNull([MI]),””””,[MI] & “”. “”),3) & “” & StrConv([LNAME] & “” XXX XX “” & Right([SSN],4),1) & “”/”” & [MOS] & “” “” & IIf([orders_type]=””RESERVIST””,””USMCR””,””USMC””) AS FULLNAME

    Viewing 0 reply threads
    Author
    Replies
    • #1037807

      After a slower look and better read-through, I fixed it by changing this:

      StrConv([RANK] & “” “” & [FNAME] & “” “” & IIf(IsNull([MI]),””””,[MI] & “”. “”),3) & “” & StrConv([LNAME] & “” XXX XX “” & Right([SSN],4),1) & “”/”” & [MOS] & “” “” & IIf([orders_type]=””RESERVIST””,””USMCR””,””USMC””) AS FULLNAME

      to this:

      StrConv([RANK] & “” “” & [FNAME] & “” “” & IIf(IsNull([MI]),””””,[MI] & “”. “”),3) & “””” & StrConv([LNAME] & “” XXX XX “” & Right([SSN],4),1) & “”/”” & [MOS] & “” “” & IIf([orders_type]=””RESERVIST””,””USMCR””,””USMC””) AS FULLNAME

    Viewing 0 reply threads
    Reply To: Syntax error (2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: