I am trying to construct the following query, I know the syntax is incorrect but could anyone suggest any ideas?/solution?
Thanks
SELECT * FROM table
LEFT JOIN x ON x.id = table.id
CASE table.nid
WHEN 1 THEN (LEFT JOIN tablea ON tablea.id = table.nid)
WHEN 2 THEN (LEFT JOIN tableb ON tableb.id = table.nid)
WHEN 3 THEN (LEFT JOIN tablec ON tablec.id = table.nid)
END
WHERE talbe.id = "hello";
i'm not sure this is the most efficient/pretty ways but you can try this :
SELECT CASE table.nid WHEN 1 THEN tablea.id WHEN 2 THEN tableb.id WHEN 3 THEN tablec.id end
FROM table
LEFT JOIN x ON x.id = table.id
LEFT JOIN tablea ON tablea.id = table.nid
LEFT JOIN tableb ON tableb.id = table.nid
LEFT JOIN tablec ON tablec.id = table.nid
WHERE talbe.id = "hello";
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I want students and events for week to be displayed in calendar formatI have this array as follows
I'm trying to download a file from my database which i have uploaded using path and copy the file to a folderWhen i download the file and try to open it it says "Failed to load PDF document"
I tried to do the following: I grouped the orders into buckets based on date and then tried to create a pivot tableHowever, I do not get the output as expected