Skip to content

Tag: sql-server

Retrieving row and column number from within a string in sql

I am trying retrieve row and column number for following strings. The numbers that follow the R are the row no and numbers that follow the C are column numbers. Also as you can see some of them are 4 digits and some of them are 3 digits. How do I use a single function to retrieve the row and

Remove the middle row of the SQL table

In My SQL Table store the Status record. There are 4 main status Open, New, Completed, and closed. There can be many New Status. But Open, Completed, and Close should only one status. But we can close status Reopen(ID 102) For the particular sequence SEQ column is the unique ID. we can consider ID and SEQ as …

SQL Compare rows of a table with multiple columns

I have a table T1 Id Col1 Col2 IsActive 1 T1 v1 1 2 T2 v2 0 Now received the following data and it need to be inserted into the above table. As this data contains some duplicated values, it need to be inserted based on IsActive Column value. For row with IsActive 1, need to insert with IsActive 2