Viewing 15 posts - 826 through 840 (of 6,678 total)
It’s funny nobody suggested the most obvious choice in such situation - RIGHT JOIN:
Select s.Shipment_No
, p.pkg_no
,...
August 6, 2021 at 1:42 pm
For 2016 and below - you can use FOR XML, for 2017 and above you can use STRING_AGG.
Declare @testData Table (Widget_ID int, Widget_Name varchar(10));
Insert Into @testData...
August 5, 2021 at 9:56 pm
You could also use OUTER APPLY or a CTE. The derived table (sub-query) is essentially the same thing as using a CTE - I personally like the CTE construct better,...
August 5, 2021 at 9:13 pm
Okay - you say the data was properly formatted, but it generated an error. Since you never provided the error - the only conclusion is that there was a problem...
August 4, 2021 at 9:17 pm
For me, I'm woefully inconsistent. I'd have:
create table dbo.Sale
( SaleID int not null constraint SalePK primary Key
, SaleDate date
)
go
create table auditing.Sale
( SaleID int not null constraint...
August 3, 2021 at 3:43 pm
Yeah - that sounds similar to an issue I had a while ago and it was related to SQLPS. It might actually be better - since you can pass on...
August 3, 2021 at 3:14 pm
No Data Is Missing
B014","S006" Bit Rate and Sample Rate Keys
If this is representative of the data in the files - then no wonder you had issues. That is not...
August 3, 2021 at 2:31 pm
Just curious, but what do you do when you have the same table in multiple schemas? For example - you could have the same table in a staging schema and...
August 2, 2021 at 9:48 pm
It would help if you provided the errors you are getting - no idea what the problem is if we cannot see that information.
August 2, 2021 at 8:27 pm
You may want to change your NOT IN to exclude the correlation. It isn't needed and may be skewing the results...the real answer to your question is: it depends.
EXISTS vs...
August 2, 2021 at 7:30 pm
In your procedure you would have 3 statements. The INSERT to add new rows to the final table, an UPDATE to update those rows in the final table where the...
July 31, 2021 at 2:36 pm
Why would you be concerned about the version of SQL Server? That should not be dependent in any way on the version of .NET you are using in the application,...
July 31, 2021 at 2:27 pm
I think I had a similar issue years ago - it has been a while so I may be completely off-base. Some constructs are not valid in SQLPS because the...
July 30, 2021 at 5:07 pm
Jeffrey Williams wrote:What event are you capturing in your profiler trace?
the events I captured as below
Stored Procedures RPC:Completed SP:StmtCompleted TSQL SQL:BatchCompleted
So which row in the trace are you looking...
July 30, 2021 at 4:54 pm
First - thanks for the response.
In the example you give the date is the same for both start and finish so it will never return any records. I can...
July 29, 2021 at 7:46 pm
Viewing 15 posts - 826 through 840 (of 6,678 total)