I have a table which contains data as follows: I want a table which do not have Mumbai—>Jaipur as it is present already before being swapped. Similarly, Lucknow—>Indore is not required. All other entries must come as it is which is there in the existing table. Can any body help. Note: Table must not have any id or S.No. in
SQL – Column containing current firmware string based on occational messages with several machines
I have a table called SessionEvents. I’m trying to create a column that represents the firmware that is on the machine to later be able to filter messages for only certain software. Currently my SQL query looks like this. (Based on answer by adamlamar in How do I efficiently select the previous non-null value? with slight modifications.) I’m using JOIN
Return word with the capital letter from string
I have a column like: How to get: Assume there is only one word with the capital letter per string. Answer You would need PATINDEX (to find any of the capital letters within the string), CHARINDEX (to find the position of space after the capital letter or end of the string) and SUBSTRING (to get the part of the whole
Combining query results for number of records in a single row
I am new to SQL. I have a table that has billion of records with multiple columns, let’s say a,b,c,d,e,f. I would like to create a query for number of records for each column with certain condition …
Is there a way to use a table value attribute in where clause in SQL
I’m very new to SQL and i feel like this is a dumb question because I couldn’t find an answer to it… I have this table in a SQL query: CREATE TABLE MOVIE ( TITLE VARCHAR(255) NOT NULL, …
APEX: Submit without refreshing the page
I have an interactive report that runs a large query, which takes about 20 seconds to execute. There are many filter items on the APEX page, which affect the data in the report. The report uses a PL/…
What’s the most efficient way of truncating the names in a first_name and last_name column to 1 character?
What’s the most efficient way of truncating the names in a first_name and last_name column to 1 character? I have a mysql database that I want to hand off to a developer but I want to partially …
How to save SQL query analytics in the background while still delivering records to user?
I am interested in knowing if there is an efficient way to record the analytics from a SQL query while still providing the records to the requester? I’m currently on MS SQL Server 2012. Let’s say for …
SQL – Finding foreign key ID associated with a combination of multiple/variable table variable rows
In a Microsoft SQL Server stored procedure, I have table variable, @PlayerComboStrategy, with a variable number of rows, and columns PLAYER_ID, POSITION_CODE, STATUS_CODE. I am looking for the most …
SQL Query to get the compliance status
I’m trying to get the following query constructed I got a table called client_vendor as follows. This stores the details of answers provided by client against a vendor for 4 questions. client_vendor …