Viewing 15 posts - 511 through 525 (of 1,424 total)
It's a great answer from Jeff which exactly matches the output. My approach also uses Jeff's "number generator" function dbo.fnTally. While Jeff "didn't use any of your dates" (because it's...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 16, 2021 at 1:51 pm
Maybe like this
if @ItemGroup is null
Select Itemcode,Itemname,ItemGroup
from tbl1
where itemgroup is null;
else
Select...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 15, 2021 at 2:06 pm
Maybe extract the constant and put the correlated subquery in the FROM clause as a CROSS APPLY
declare @vmax_var ...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 15, 2021 at 1:43 pm
Maybe a good way could be an UPDATE statement
update t
set flag = case when v.row_count=1 then 'ANY_EMPTY'
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 14, 2021 at 6:44 pm
In the situation where Sum([QTY]) returns the correct the number, AVG(OH) or MAX(OH) ought to return only 1 SKU
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 12, 2021 at 4:59 pm
At a minimum it's missing a comma at the end of the first line. Is it necessary to nest SELECT statements within the SELECT list as you've done? It seems...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 11, 2021 at 2:52 pm
Yup, I was one of the 'most people' crowd, thanks for alerting me to that, Jeff. Always good to be aware of these extra possibilities. It was also only...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 9, 2021 at 2:52 pm
Now, if they'd just add a machine language sequence generator to replace fnTally, create a BULK EXPORT, and create a truly useful xp_Dir...
The DIY way could be to...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 9, 2021 at 2:37 pm
Concat_ws was originally in MySQL then the other db's borrowed it iirc. The big news for me is .NET 6 which I'm really liking a lot because it nicely untangles...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 9, 2021 at 1:29 pm
CONCAT_WS() "concat with separator" ignores the nulls
select concat_ws(' | ', t.Col1, t.Col2, t.Col3) [output]
from #t t;Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
December 8, 2021 at 3:19 pm
The date could be converted without using string functions. Also, the WHERE clause might be a more appropriate place to filter the rows. Maybe something this
declare @UPSBatchInvNot...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 26, 2021 at 5:49 pm
Why would you want to avoid JOIN? Maybe use IN but there's no benefit afaik and it might actually be slower
select partc
from #partsc
where VerificationHash in(select VerificationHash
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 25, 2021 at 2:06 pm
What is the primary key of the target table? With Scenario4 you're inserting a new row which would duplicate (or more?) the TaskId. Once the TaskId is non-unique then further...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 25, 2021 at 1:40 pm
So a billion flies cannot be wrong? Imo attempting to derive wisdom from overdefined equations could turn out to be counterproductive
Not sure what you mean here. If you're...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 24, 2021 at 5:21 pm
So a billion flies cannot be wrong? Imo attempting to derive wisdom from overdefined equations could turn out to be counterproductive
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
November 24, 2021 at 2:14 pm
Viewing 15 posts - 511 through 525 (of 1,424 total)