My issue is I want to order by match on a specific search string. This is the logic: If the title, author or isbn are the same as search, show these books first If the title, author or isbn are the like %search, show these books second If the title, author or isbn are the like search%, show these books
Tag: string
From string, extract a word starting with a keyword (SQL or any other methods?)
Let’s say I have a string of random characters, and I want to extract only the string that starts after a specific keyword (including the keyword). How could I do so using MySQL or MariaDB? ………….. String example: axdsSSFddlwie ====> SSFddlwie aldfklafnlanaSSFiiie ====> SSFiiie iiiSSFnnnn ====> SSFnnnn Thanks for the help! Answer Using the base string functions we can try:
How to get the part of a string after the last occurrence of certain character?
I would like to have the substring after the last occurrence of a certin character. Now I found here how to get the first, second or so parts, but I need only the last part. The input data is a list of file directories: Unfortunately this is the data I have to work it, otherwise I could list it using
Extract string between two characters in a string
I have a set of strings that has datetime values and I would like to extract them. I am not sure if this is even possible using T-SQL. Expected Results: Answer For this dataset, string functions should do it: The idea is to count backwards from the end of the string, and capture the 14 characters that preced the extension
SQL Collect duplicates to one place? PostgreSQL
Sorry I’m new here and I’m also new with SQL and can’t really explain my problem in the title… So I have a TV show database, and there I have a Genre column, but for a TV show there are multiple Genres stored, so when I’m selecting all my TV Shows how can I combine them? It needs to look
How to make IN on values from cell?
I have table which contains list of data ceparated by coma eg I am trying to left joint it with IN clause, but without success Answer One option uses string functions:
How to extract text between two words in Oracle
This is the source string: random foobar “name” : “Jack Ryan”, other random stuff In Oracle query, how do I extract Jack Ryan from it? I guess I am looking for whatever is between “name” : ” and “,…
Update field with a shorter string
I need to modify the LENGTH of text in field in db mysql. I’ve attribute_name that I need to have with max LENGTH 28 characters. WordPress and woocommerce limit this field to 28 characters. Right now my website is down because some taxonomies are too long. There is a way to “cut” all attribute_name <= 28? All my attribute_name should
Combining some of the rows and sum them up in oracle sql
I`m working on some data manipulation and have table: I need to have and output to look like: Please suggest what can I use to combine and sum up those. I appreciate any input! Thank you Answer You can use aggregation. Values are strings, so you probably want to concatenate them rather than sum them (which makes no sense in
How to return the difference between 2 strings using Oracle SQL only
I have 2 strings for example: ‘Source:Siebel; Name:Mary Jane; Gender:F; Age:24; N;’ ‘Source:Siebel; Name:Marie; Gender:F; Age:24; N;’ The result I need is: Name:Mary Jane; Name:Marie; Most likely I need to reverse below code from Oracle Function to return similarity between strings as the result was the similarities [QueryResult] of the 2 strings I cannot use the procedure as I need