Results 1 to 6 of 6

Thread: inner join with console

  1. #1
    Senior Member
    Join Date
    Jul 2013
    Location
    Ontario, Canada
    Posts
    658

    inner join with console

    Hello,

    Can the console handle an sql query with multiple inner joins?
    I've tried a few times and the following is returned on the second inner join
    Unrecognized SQL phrase/keyword
    Cory

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,670
    Hi Cory,

    It should be fine - just remember it needs to be a single line as you can't use the ; continuation in the Console.

    e.g.

    Code:
    open database southwind
    SELECT customers.customerid, customers.companyname, orders.customerid,  orders.orderid, order_details.orderid, order_details.productid FROM customers INNER JOIN orders ON customers.customerid = orders.customerid, orders INNER JOIN order_details ON orders.orderid = order_details.orderid
    Regards,

    Yvonne

  3. #3
    Senior Member
    Join Date
    Jul 2013
    Location
    Ontario, Canada
    Posts
    658
    Hi Yvonne,

    Thank you for the help.
    The reason I was having difficultly is because the syntax is slightly different than regular sql joins (ex. using a comma between joins).

    Cory

  4. #4
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    552
    Hi Cory,

    If I remember correctly from an earlier post on views I think Barry altered it so you can also use ( as in vfp for the joins.

    David

  5. #5
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,670
    Hi David,

    Yes - the discussion is here: http://www.lianja.com/community/show...-Complex-Views.

    Regards,

    Yvonne

  6. #6
    Senior Member
    Join Date
    Jul 2013
    Location
    Ontario, Canada
    Posts
    658
    Thank you David and Yvonne.

    Cory

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us