Skip to content

Tag: sql-server

How to add split between duplicate value in SQL

I have SQL Server table that have duplicated value in field and need to split by slash character. All field start with alphabetical char end with ‘M’ char For example: and need to convert to: Thanks Answer Probably many ways to skin this cat, assuming you’re always looking for the same initi…

SQL Server – Concatenate – Stuff doesn’t work

I have this query in SQL Server and I want to concatenate using stuff the ‘Products’ column, but I don’t know why this doesn’t work… And the result is: And I want this: Also I used SELECT DISTINCT in the query but the result is the same… So, where can be the mistake? Answer…

How find last number of sequence numbers in sql?

I want find last number of sequence in sql query for fill automatically suggestion field value. forexample my code field(column) is :1,2,3,4,10,20 so i want found 4 in my query Answer If your table is called table_name and looks like this: id 1 2 3 4 10 20 Then this should work: Fiddle