Skip to content

Tag: sql

Selecting substring with different starting location

(I’m not sure if I’m using the correct title… please let me know if you think it should be changed to something else) Hi, I’m trying to select substring with different starting location. I have a table like this, Req: I’m trying to get a table like this: After googling around, I …

Pivoting a table of survey data in SQL without PIVOT

I have a table called Responses which contains survey responses using the following structure. This is data for two different survey responses. Each survey has 4 questions (QuestionIDs) but the last one (long text) is optional, so some responses only have 3 rows of data. The first question (QuestionID “…

Whats the right syntax to CONCAT in wpdb?

I’m quiet new in working with wordpress database tables. So far I know because of the wpdb documentation how to update a row in a table. Now i want to achive to update the row and keep the old data in that row. I’ve read that you can use the CONCAT function to get this working but I’ve no cl…