C
C#

help

✅ Why wont these SQL queries work?

Mmoshimoshi3/15/2023
Creating a userview - this works.
CREATE VIEW GoodCustomer
AS SELECT CustomerID, CustomerName,
MemberCategory,CountryCode
FROM Customers
WHERE MemberCategory IN (‘A’,’B’)
CREATE VIEW GoodCustomer
AS SELECT CustomerID, CustomerName,
MemberCategory,CountryCode
FROM Customers
WHERE MemberCategory IN (‘A’,’B’)
Update userview - doesnt work
UPDATE GoodCustomer
SET MemberCategory = ‘C’
WHERE CustomerID = 1000
UPDATE GoodCustomer
SET MemberCategory = ‘C’
WHERE CustomerID = 1000
Insert userview: - doesnt work
INSERT INTO GoodCustomer (CustomerID,
MemberCategory, CountryCode)
VALUES ( ‘5000',’C’, ‘USA' )
INSERT INTO GoodCustomer (CustomerID,
MemberCategory, CountryCode)
VALUES ( ‘5000',’C’, ‘USA' )
JJimmacle3/15/2023
"doesn't work" is not specific
Mmoshimoshi3/15/2023
Can I ask for this query in SQLite: I have created a view successfully called Customer1998. When I run this query
SELECT * FROM customer1998;
SELECT * FROM customer1998;
it gives me this error: Result: no such table: main.order details How can i Resolve this?
Mmoshimoshi3/15/2023
Regarding this, is this becoz of the view-defining condition?
Mmoshimoshi3/15/2023
Ah i managed to resolve this!!

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts