Skip to content

Tag: sql-server

Query SQL with similar values

I have to make a query to a base using as a comparison a string like this 12345678, but the value to compare is this way12.345.678, if I do the following query it does not return anything. SELECT * …

SQL query for column numbers

I have a table with information like : With these 2 columns I need to pull a column like “New Column” which is basically serial numbers of pages for each order. I tried ROW_NUMBER() OVER(ORDER BY …

Calculate the numbers of week names

I tried to edit but I have not knowledge about the number of weeks: declare @from datetime= ‘2019-06-01’ declare @to datetime = ‘2019-06-19’ select datediff(day, -3, @to)/7-datediff(day, -2, @from)…