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:
Tag: mariadb
Get a group of records by last unknown id
I have a log table where I want to select the entries for a specific group of records that are grouped by an id I don’t know. See the table below, there are more columns but these are not relevant for the question. I want to get the last entries of one process for one device When I query something
SQL – Select the most close values to date in a table
Hi everyone i have a table called measure made up like this And I want to select all the lowest values such as I can do it by code but i prefer to use SQL for performance reason so I tried this query: but the result is not good, I see too many results and are also somehow duplcated, how
How to compare database data in php
I want to compare the database data in the php. This is my table hospital_payment_data table cash_receipt_publish table This is my sql syntax in this web page result I Want result If the date and the amount match or the amount match, I would like to express it as False by comparing the table with the table in cash_receipt_public. Answer
How to make a workable SQL request for NodeJS file?
I have a js file to work with my local database, and a POST request is not working like it should – if I enter a specific row, it returns a correct result, but I need it to get the variable from post data. This type of entering query doesn’t work 🙁 Answer You can try to use the “Prepared
How Do I Get The Name From A Different Table Then The One I’m Calling?
I have two tables, one called ordersofitems and one called products. Now both of these have the column productid, but only my products table has the name associated with it. How would I retrieve the corresponding name for each row? So far, I have this statement that takes and organizes the table by the productid. All this leaves is to
How do I retrieve data from two tables?
I was on the “hospital_payment_data” table. I want to call up the data of the number of data, the cache_account_received sum, and the total_medical_bills sum, and then bring up the mount sum value …
Why MariaDB refuses to create a simple table with error [42000][1064]?
I just want to know how to fix this, or why MariaDB server keeps me returning an error. I just install the database, create a user, a new schema, I’m pointing to that database with use database testing; and I’m ready to create a simple table on a database with this query: The user in the database I’m using has
number of appearances of an atribute before a date in a query
I have this table and what I need as an output is to have for each payment the number of payments that have been done with the same credit card. For example, for the first payment there would be 0 payments with the same credit card. for the second payment there would be 1 payment with the same credit card.
SQL – Selecting from a multiples values field
I’m using Teampass, here is a minimised example of the tables schema Teampass_Roles_Title : and Teampass_Users the numbers in fonction_id are the ids from the table Teampass_Roles_Title Instead of using an intermediate table, they opted for this model, and I dont know if there is any way to have for example a liste of all users that access to Title