I've come across the following SQL syntax issue in Sqlite that is maybe
a bug (or maybe just a product of my poor SQL knowledge!)
I have a database that from the command line will execute the following
statement fine:

SELECT clients.cl_lname, clients.cl_title, price_profiles.pp_year
FROM clients LEFT JOIN price_profiles ON clients.cl_id =
price_profiles.pp_client

But gives and error with the following statement (it will run fine on
the same tables in Access)

  SELECT clients.cl_lname, clients.cl_title, price_profiles.pp_year,
prices.pr_mfd, prices.pr_price
  FROM (clients LEFT JOIN price_profiles ON clients.cl_id =
price_profiles.pp_client) LEFT JOIN prices ON price_profiles.pp_id =
prices.pr_pp

  SQL error: no such column: clients.cl_lname

If I remove the table part of all the column names (luckily the column
names are unique) then the statement will execute with no problems.

  SELECT cl_lname, cl_title, pp_year, pr_mfd, pr_price
  FROM (clients LEFT JOIN price_profiles ON cl_id = pp_client) LEFT JOIN
prices ON pp_id = pr_pp

Is this behaviour expected in Sqlite? Is there an alternative format I
should use in the above case?

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to