2 Replies - 738 Views - Last Post: 04 December 2012 - 10:26 PM Rate Topic: -----

#1 kentlucky  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 64
  • Joined: 20-June 12

SQL STATEMENT IN VB6

Posted 03 December 2012 - 02:57 AM

I have a syntax error in vb6 select sql statement:
SELECT DATA001.FNAME,DATA001.SNAME,EMMA-WEB.ZIPFILE FROM DATA001,EMMA-WEB WHERE DATA001.RECNUM = EMMA-WEB.RECNUM


I know that my error is when I put dash(-) in sql statement
Is anyone here can help me on how to solve this problem.. Thanks
Is This A Good Question/Topic? 0
  • +

Replies To: SQL STATEMENT IN VB6

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8365
  • View blog
  • Posts: 31,080
  • Joined: 12-June 08

Re: SQL STATEMENT IN VB6

Posted 03 December 2012 - 07:52 AM

Throw brackets around those column names with the dash in it.
Was This Post Helpful? 0
  • +
  • -

#3 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 571
  • View blog
  • Posts: 2,979
  • Joined: 19-May 09

Re: SQL STATEMENT IN VB6

Posted 04 December 2012 - 10:26 PM

SQL thinks you're saying "EMMA minus WEB". :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1