Relative Content

Tag Archive for sqlsql-serverazure-sql-database

View to Fill Time Gaps in SQL

I am working on onboarding data onto a platform which can visualize data only at hour grain or day grain. I provided them with connection string to my db and that system pulls data from it and shows it as a graph and do a bunch of slice and dice operations. Problem is its chart based visualization works only at hour or day grain and my data is once every 4 hours. It considers this as missing data and the graph comes up as dots instead of continuous line. So I thought of exposing a view which can time gap fill data at hour grain with the last data used and the platform can use it. This is presenting with some issues.

How to Replace any instance of item in a SQL Database

I’m working with an MS SQL Database where the object ‘Target’ is extensively used. It appears in various forms such as a field name (Target), a variable (@Target), and within several table-valued functions.

How to find rows in table per group that are not in another group of the same table

I have a table of products which lists all the products held within our branches. This includes whether a product is a PackingLine one. A product either is or is not a PackingLine, it doesn’t change per branch, however not all branches have every packing line. I need to find those branches and products. A simplified version would be