Viewing 15 posts - 766 through 780 (of 1,398 total)
drop table if exists #Stats2;
go
CREATE TABLE [dbo].#Stats2
([StatsDate] [datetime] PRIMARY KEY,
[TypeA_Calls] [int] NULL,
...
December 21, 2020 at 6:12 pm
What if there is more than one 'Period Key' for a (Support_Start_Date, Support_End_Date) pair?
Maybe you're looking for something like this? It returns multiple rows if the (Support_Start_Date, Support_End_Date) pair spans...
December 18, 2020 at 9:56 pm
declare
@sql_prefix nvarchar(max)=N'select id.PartIdC, id.PartIdX,',
@sql_suffix nvarchar(max)=
N'from #InputData id
left join #partsdata p1 on...
December 18, 2020 at 4:50 pm
I am currently trying to backfill data from an S3 bucket, to SQL server using Alteryx. Unfortunately, there is a lot of data and running a month at...
December 18, 2020 at 2:40 pm
Please post the CREATE TABLE Data Definition Language (DDL) of both of your tables. Without knowing how the keys (PK_POSTE , FK_POSTE) and constraints are defined we don't have enough...
December 18, 2020 at 2:32 pm
Using conditional aggregation
select NAME_POSTE,
max(iif(NAME_PARAM='NamePrinter', VALUE_PARAM, null)) NamePrinter,
max(iif(NAME_PARAM='PathPrinter', VALUE_PARAM, null)) PathPrinter
from #P p
...
December 18, 2020 at 1:42 am
Here's a non-dynamic query to produce the output. If there's a variable number of features then it would need to be dynamic.
select id.PartIdC, id.PartIdX,
...
December 18, 2020 at 12:41 am
One way or another I would like to come up with a way to deal with JSON schemas. If I observe how my time is spent and do the...
December 16, 2020 at 3:44 pm
with zpl_cte(Zplid) as (
select Zplid
from #gen
group by Zplid
having count(*)=3
...
December 13, 2020 at 11:25 pm
I did find some old documentation for SQL Server 2005 which says the SUM function may be followed by the OVER clause.
Yep... and I didn't...
December 12, 2020 at 3:30 pm
thanks for the response but I need it only with a nested while loop.
Don't re-use @I. Come up with a new variable to store the counter for the inner...
December 11, 2020 at 5:32 pm
To fix the first issue you could add 'order_num' to the GROUP BY clause.
Not sure why 'Dry Feed' doesn't show. It's using an equivalent of the 'Dry Feed' WHERE clause...
December 11, 2020 at 5:20 pm
Why is this necessary? Here's a solution using (two of) the fnTally function to generate the rows instead of WHILE loops. Re-using declared variables is generally not a good...
December 11, 2020 at 3:16 pm
Sorry it's been a busy day! Please give this a try
declare
@start datetime='2020-11-29 00:00:00.000',
@end ...
December 11, 2020 at 12:46 am
The second post makes the first one clearer. In the first post the 2nd query in the statement containing UNION ALL is the only place where 'Dry Feed' is defined...
December 10, 2020 at 3:12 pm
Viewing 15 posts - 766 through 780 (of 1,398 total)