Viewing 15 posts - 241 through 255 (of 300 total)
The standard behavior for concatenation of strings is that if one of the strings to be concatenated is a null the concatenated string will also be null.
You can change this...
February 25, 2021 at 11:14 pm
select
PartId,
FeatureName,
Status,
case when exists (
select * from #parts
where PartId=p.PartId
and FeatureName=p.FeatureName
group by PartId, FeatureName
having count(distinct status) > 1
)
then 'Have Multistatus' else Comment end as...
February 25, 2021 at 10:54 pm
The picture you posted is not a table by definition. It's got duplicate rows! You have no key or constraints. The strings you posted are not how we represent...
February 25, 2021 at 8:55 pm
I do not consider "2359 to 2359" a valid case, as that might imply it may also span multiple days
As could any of the other midnight-spanning entries. You have...
February 25, 2021 at 11:28 am
Just to expand on the ideas presented by Jeff Moden and Steve Collins, here is my contribution, which also solves the midnight spanning caveat...
(and yes, I prefer a simple select...
February 25, 2021 at 12:45 am
....With that, the following creates exactly the output you asked for where none of the above do.
Acknowledged! 🙂
Adapting the code... -- though I'm still assuming that the OP has used...
February 15, 2021 at 8:22 pm
Instead of manually wrangling with the connection string in SSIS, you'd be better off modifying/overriding the connection attributes using the Expressions on the connection. Hint: you can select the ExcelFilePath...
February 15, 2021 at 7:08 pm
This code will work for the data provided by the OP. But what if sales does in fact decrease on the last of the month (due to some credit notes...
February 15, 2021 at 5:50 pm
Thank you, looks promising. Not quite the session scoped lock I was thinking of, but using a transaction scoped lock is probably okay.
But, hmm...
Looking at the description of table hints...
September 2, 2020 at 5:00 pm
Just as an aside: I like to use Notepad++ instead of the standard Notepad program for checking a text. You can instruct Notepad++ to show all control characters as symbols,...
September 2, 2020 at 3:01 pm
This is pure undeluted guesswork, since you haven't provided the requested input and output data samples yet.
I'm imagening a scenario, where products may be unavailable for periods of time (i.e....
July 28, 2020 at 5:19 pm
Another USe case.
I have multiple parameterized SP for our Application.
When I Executes those SP individual it will returns output within 1 Sec. But when we are running Test Load...
July 27, 2020 at 10:39 pm
This is probably a couple of stupid questions that shows my ignorance, but if you never ask how will you learn... 🙂
July 27, 2020 at 7:39 pm
Not to be left out, here's my take on a possible solution: 🙂
DROP TABLE IF EXISTS #testdata;
CREATE TABLE #testdata -- Source data structure as specified by OP...
(
...
July 23, 2020 at 6:56 pm
Just a thought... have you tried to change the driver on your connection in the package?
If you're using OLE DB, then you're most likely using the old "SQL Server Native...
July 23, 2020 at 12:05 pm
Viewing 15 posts - 241 through 255 (of 300 total)