Viewing 15 posts - 1,351 through 1,365 (of 6,679 total)
In the future - please provide sample data in the form of a create statement and insert statement. That can be done using temp tables or a table variable. I...
January 29, 2021 at 5:43 pm
If you are moving SQL across DC's - then you must put in place a method to copy the local native backups to a shared location reachable from both DC's,...
January 29, 2021 at 5:14 pm
The problem is the loop and the fact that this runs 2400 times per day. It appears the goal is to delete any rows older than 24 hours (your DATEADD...
January 29, 2021 at 5:06 pm
I am guessing here - but it looks to be an issue with using float. Since float is an approximate data type - the value of 3.275 is probably set...
January 29, 2021 at 4:30 pm
Ah... you're correct. No pivots required for this problem so no Cross Tab (although the code is nearly identical... just missing a CASE in each sum for the non-CROSSTAB...
January 28, 2021 at 7:47 pm
The thing above (which you posted) is actually "just" a CROSSTAB (which will have a GROUP BY) with a ROLLUP. With...
January 28, 2021 at 7:31 pm
Thanks. This is actually SQL Server 2016+, but I've edited the question
There isn't a correct answer for this - SQL Server 2016 does not have TRIM, it only has...
January 28, 2021 at 7:01 pm
They have added a new parameter for BULK INSERT named FIELDQUOTE. Add that to your command and specify the double-quote as the field quote and it should get you past...
January 28, 2021 at 6:56 pm
I put this together - based on the data you have we can get the results you are looking for with this:
Declare @mockTable Table (
...
January 28, 2021 at 5:58 pm
Since you have this mocked up data - you can use that same data to build out a temp table with the associated data. Once you have that and posted...
January 28, 2021 at 5:24 pm
You don't do anything specific to 'accept' a parameter via URL. You create a parameter in the report - and tie that parameter in the report to the stored procedure...
January 27, 2021 at 8:02 pm
Okay - these are simple issues to correct, assuming what you want is code for a specific ledger then we can do this:
Declare @ledgerID int = 1222;
...
January 27, 2021 at 6:39 pm
This is an UNPIVOT - and you could use that operator, but I prefer CROSS APPLY:
Select sp.MAINJOB
, m.MappedJob
...
January 26, 2021 at 10:20 pm
This is what I think you want:
With transactions
As(
Select Trans_ID = 0
, Trans_Type...
January 26, 2021 at 9:21 pm
Remove AST.AppointmentStatusName from the GROUP BY - you are not including it in the select. If you want to group by 'Call Center' or 'Web' then you need to define...
January 25, 2021 at 10:54 pm
Viewing 15 posts - 1,351 through 1,365 (of 6,679 total)