Skip to content

Tag: string

how to use wildcard for a column jsonb type

I have a table (named profile) in my Postgres database, which has 3 columns: ID, Day, Ftfm_profile of type jsonb, I tried to extract the row where the profile name (ftfm_profile->’name’) begins with ‘LFBB’ ( sql: LFBB%) using the wildcard as following: the expected result: I can&#82…

SQLite Incomplete Time String

I have a table with incomplete time strings, such as ‘0:09.735’ (minutes:seconds.milliseconds). As the function strftime expects certain formats, such as ‘%H:%M:%f’, I have “to complete” the incomplete timestring first. The first strftime function with the complete timestri…

SQL Merge the row into new column

I have a table named Addresses. The columns are: There is no data in Property as of yet as I will update it manually later. The rest of the columns does hold data though. However I need to merge Road, Town, Borough, District and Postcode into a new column named Full Address. So for example If you can see the

SQL new table with conditions

I have a table and I want through sql to parse it into another table. The problem is that there is a condition: There are 3 columns in old version And I want to store them into new table’s column like : Thanks in advance. Answer You can use case expressions and string concatenation, like so: This uses s…