Skip to content

Tag: sql-server

Didnt print on Procedure on SQL

So I try to print a message when I have any confirmation or error. I have this table [Friendship] that have the ID, friend mail, their mail and the date that have been confirm the friendship, Table without data When I use the EXEC for this PROCEDURE, I have the insert values, but not the print´s acctions&#823…

how to Update an empty table with the result of a query

i have a table name average rating. i want to update my table name final rating with the result of this query how can i do this? Answer Maybe something like or if the FinalRating table contains more information you could also specify the columns you can also add a where clause to either query if you need a su…

Extrapolate Data

I have the following two tables in my database. One holds transaction data and the other holds development periods. How can I extrapolate the data into the future development periods like below? Answer One method uses cross apply:

Find Gaps in a single date column SQL Server

Good Day everyone, I need your help. I am trying to detect gaps in a single column of the type Date or DateTime in SQL Server. Say we have a list of schools and each school has many records and there is a field of uploadDate. So something like that: My outcome would be something like that: Thank you all.