Skip to content
Advertisement

Tag: sql

SQL, like, after characters

It’s possible to do a LIKE SQL after some characters? I wanted “LIKE” sql after “:” with ” A” So, REGEX like should be return only the first and third sentence. For the fourth sentence, i added ” ANSWER” should not itself return because the regex is ” A” and not ” A%” Do you have an idea? Answer Simply

SQL Left Join after UNION, error in your SQL syntax [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 4 months ago. Improve this question This is my SQL, but I get “error in your SQL syntax”: Answer

Query to get the latest treatment for each machine

Let me just start by saying that I don’t care on which type of SQL I get an answer on. In reality I am creating my question in Kusto but the Kusto thread in stackoverflow is dead most of the time. This is just to give me an idea of on which way I could do this so I can

Multiple conditions in CASE WHEN statement

I’m working in SQL (Amazon Redshift) with Recruitment data where each applicant has multiple sources, which I’ve split into different columns called source_1, source_2, and source_3, along with a number_of_sources column to record how many sources that applicant has. We want each applicant to only have one source, and have certain rules to follow in how to select which source,

Update table to make primary key out of two foreign keys

Have a table sample_tag which already exists with 1000’s of entries. It consists of two foreign keys, sample_id and tag_id. However, the database is allowing duplicate sample_id/tag_id records to be created. Without creating a new table, is there a SQL statement to update the sample_tag table such that the two foreign keys, together, function as its primary key? Database is

Advertisement