Hello. Can someone please help with this issue. It may turn out to be a bug in Sqlite 3.

I have the following fairly basic SQL View that works fine with Sqlite 2.x:

CREATE VIEW Invoices AS
SELECT Customers.CustomerID, Customers.CompanyName,Orders.OrderID, OrderDetails.ProductID, OrderDetails.Quantity FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID INNER JOIN OrderDetails ON Orders.OrderID = OrderDetails.OrderID


When I create and run this view in 3.x, I get all of the rows back, but all values are NULL!

If I run the SELECT statement apart from the view, it I get the data back fine. But if I select * FROM Invoices, I get all of the rows back, but all values are NULL.

Another interesting thing is that when selecting from the View, the column names are without the table prefix. That is, CustomerID, CompanyName, OrderID, et. But if I select from the tables directly, the column names have the table prefix, Customers.CustomerID, Customers.CompanyName, Orders.OrderID

I have put the database up on my website here (Zip file):

   www.eztools-software.com/downloads/northwind.zip

This is happening in all version 3.0.5-3.0.7. Can someone please download this DB and investigate.

If you want to test the same view and data with a v2.x database, you can get the SqlitePlus28 download from here:

   www.eztools-software.com/downloads/sqliteplus.exe

TIA
-Brett Goodman




Reply via email to