Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quote marks unbalanced NEWBIE

Status
Not open for further replies.

galonso

IS-IT--Management
Aug 31, 2006
1
US
I am a newbie to all this so take it easy with me.

I was trying to finish a query but I am getting an error saying The quote marks are unbalanced in this expression:

This is the query:

sqltext = "Select a.EV.TEXT1,a.EV.TEXT2,a.EV.TEXT3,a.EV.TEXT4,a.EV.TEXT5,a.EV.TEXT6,
a.EV.DATE1,a.EV.DATE2,a.EV.EFF.DATE,a.EV.FOLLOW.DATE"
sqltext =sqltext *"PM.LOC.NO,PM.EMP.NO, rtrim (b.PM.LAST.NAME) +',' + rtrim (b.PM.FIRST.NAME) as eename from PR_EVENT as a"
sqltext =sqltext*" inner join PR_MAST as b on (EV.LOC.NO=PM.LOC.NO and EV.EMP.NO=PM.EMP.NO)"
sqltext =sqltext*" and a.PM.LOC.NO=+ LocNo,"

Any help would be very appreciated.
 
Try
Code:
sqltext = "Select a.EV.TEXT1,a.EV.TEXT2,a.EV.TEXT3,a.EV.TEXT4,a.EV.TEXT5,a.EV.TEXT6,
a.EV.DATE1,a.EV.DATE2,a.EV.EFF.DATE,a.EV.FOLLOW.DATE"

sqltext =sqltext [red]& [/red]"PM.LOC.NO,PM.EMP.NO, rtrim (b.PM.LAST.NAME) +',' + rtrim (b.PM.FIRST.NAME) as eename from PR_EVENT as a"

sqltext =sqltext [red]& [/red]" inner join PR_MAST as b on (EV.LOC.NO=PM.LOC.NO and EV.EMP.NO=PM.EMP.NO)"

sqltext =sqltext [red]& [/red]" and a.PM.LOC.NO=+ LocNo,"
or just
Code:
sqltext = _
"Select a.EV.TEXT1,a.EV.TEXT2,a.EV.TEXT3,a.EV.TEXT4,a.EV.TEXT5,a.EV.TEXT6, " & _
"a.EV.DATE1,a.EV.DATE2,a.EV.EFF.DATE,a.EV.FOLLOW.DATE " & _
"PM.LOC.NO,PM.EMP.NO, rtrim (b.PM.LAST.NAME) +',' + " & _
"rtrim (b.PM.FIRST.NAME) as eename from PR_EVENT as a" & _
" inner join PR_MAST as b on (EV.LOC.NO=PM.LOC.NO and EV.EMP.NO=PM.EMP.NO) " & _
" and a.PM.LOC.NO=+ LocNo,"
 
Just a though: I don't see any ANSI SQL issue above ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top