Оператор sql:
SELECT 'customer_address'._id, 'address'.Descriptor AS Name
FROM 'customer_address'
INNER JOIN 'address' ON 'customer_address'.AddressID='address'._id
WHERE 'customer_address'.CustomerID=4 ORDER BY Name
Когда я проверяю БД с помощью оболочки adb sqlite, он сообщает, что схема для таблицы адресов:
CREATE TABLE address (
_id INTEGER PRIMARY KEY AUTOINCREMENT,
EntityID INTEGER NOT NULL,
TypeID INTEGER NOT NULL,
Address VARCHAR(256) DEFAULT NULL,
City VARCHAR(32) NOT NULL,
Region VARCHAR(24) DEFAULT NULL,
PostalCode VARCHAR(12) DEFAULT NULL,
Country VARCHAR(30) NOT NULL,
Descriptor VARCHAR(512) NOT NULL,
Memo VARCHAR(1024) DEFAULT NULL,
`Profile` VARCHAR(64) DEFAULT NULL,
TofP DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP)
и дляпредставление customer_address:
CREATE VIEW customer_address
AS select address._id AS _id,corporation.CustomerID AS CustomerID,address._id AS AddressID
from (corporation join address on((corporation.EntityID = address.EntityID)))
where (corporation.CustomerID is not null)
Кто-нибудь может увидеть ошибку?
thnx