hi,
i have been working on creating a view in my database:
CREATE OR REPLACE VIEW productnotgot( ProductID, Product, ClientID, ClientFirstName, ClientLastName, Email1, Tel1, Email2, Tel2, ProductSold) AS SELECT Product2ID, 'Product2', c.ClientID, c.App1FirstName, c.App1LastName, c.App1Email, c.App1Phone, c.App2Email, c.App2Phone, p.clients_ClientID
FROM clients c JOIN Product2 p on c.ClientID = p.clients_ClientID WHERE p.clients_ClientID IS NULL
GROUP BY ClientID
UNION SELECT ProductID, 'Product1', c.ClientID, c.App1FirstName, c.App1LastName, c.App1Email, c.App1Phone, c.App2Email, c.App2Phone, p.clients_ClientID
FROM Product1 p JOIN clients c on p.clients_ClientID = c.ClientID WHERE p.clients_ClientID IS NULL
GROUP BY ClientID
The query executes with no errors but is not displaying any data.
i want to basically show all the clients with a particular product in the database.
any help woudl be appreciated.
many thanks