Results 1 to 3 of 3

Thread: What's wrong w/ this Join SQL Statement?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Location
    bebenia, PA, USA
    Posts
    241
    I am getting an Incorrect syntax near the keyword 'FROM'.

    heres the code:

    SELECT 'Reciept ID' = Receipt_id, 'Customer Type ID '= Customer_type_id,
    FROM database.dbo.vw_receipt_item ri join database.dbo.vw_LaLa l
    ON ri.receipt_item_id = l.receipt_item_id
    Where created_dt between @TodayDate and @HourBackDate AND Customer_type_id = -1000 or Custome_type_id = -1015

  2. #2
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    Try getting rid of the comma after the last field before the word FROM.

  3. #3
    Lively Member Backbraker's Avatar
    Join Date
    Dec 2000
    Location
    Lummen, Belgium
    Posts
    117
    If you made this Join with the SQL Builder, I suggest next time you make a query in Access and the copy the sql to your vb program. I found a bug in the Joins created by the sql builder of VB6...
    Breaker

    (VB 6.0 ENT SP3 WIN 2000 PROF)=> WORK
    (VB 6.0 ENT SP3 WIN ME)=> HOME -> Upgrade to .NET is coming

Posting Permissions

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



Click Here to Expand Forum to Full Width