Viewing 15 posts - 601 through 615 (of 2,648 total)
select top(6500)
ROW_NUMBER() OVER (ORDER BY N) ID_INT,
'10.' + char(ascii('A') + N/1000) +...
January 6, 2023 at 8:30 pm
You should ORDER BY the entire query in the same order as the ORDER BY in the OVER clause.
SELECT DA.DC,
DA.WEEK,
...
January 6, 2023 at 7:25 pm
Jonathan AC Roberts wrote:It will even answer Jeff's primary interview question correctly:
Actually, that's just the first part of the answer that I expect. 😀
...
January 4, 2023 at 6:43 pm
Jonathan AC Roberts wrote:It will even answer Jeff's primary interview question correctly:
Actually, that's just the first part of the answer that I expect. 😀
But I'm sure it got further...
January 4, 2023 at 5:49 pm
Jonathan AC Roberts wrote:It will even answer Jeff's primary interview question correctly:
Actually, that's just the first part of the answer that I expect. 😀
But I'm sure it got further than some...
January 4, 2023 at 5:46 pm
I thought I'd ask my new found tech ChatGPT this question, if there is anyone who hasn't tried it they should, it even knows a bit of...
January 4, 2023 at 5:26 pm
Except for the occasional Indexed View, this is one of the many reasons why I hate views.
Instead, try a "parameterized inline view" better known as an "Inline Table Valued...
January 4, 2023 at 1:23 am
This will identify rows that don't match:
SELECT [D1].[RowID] AS [D1_RowID],
[D1].[PairID] AS [D1_PairID],
[D1].[SequenceInt] AS...
January 1, 2023 at 2:37 am
Is this solution is only good if there are no dates falling on weekends?
what mention of weekends? there is nothing on the original OP post that mentions it...
December 31, 2022 at 4:31 pm
Is this solution is only good if there are no dates falling on weekends?
December 31, 2022 at 11:26 am
@frederico_fonseca I had the same idea as you initially, but your solution will not work either. What if there were 20 groups instead of 3? What if the gaps...
December 30, 2022 at 6:40 pm
I think the query can be simplified to this:
SELECT @RowCount = COUNT(*)
FROM Quality q (NOLOCK)
WHERE (q.Quality_Date <= DATEADD(DAY, @Interval,GETDATE())
...
December 30, 2022 at 5:30 pm
This is probably the fastest code but a bit long winded
declare @Delimiter char(1) = '/'
;with cte as
(
select 'Invoice/14/248/TD C/O BGIS/20009. 1/ 16566/JB App...
December 30, 2022 at 5:09 pm
Also convert '12/31/9999' to a proper date-type for comparison
In Belgium this would read as the 12th of month 31 in the year 9999
In the UK too
December 30, 2022 at 10:18 am
Got it.
select 'LOAD DATA INFILE ''db/'+name+'.txt'' INTO TABLE '+name+'('+STRING_AGG(COLUMN_NAME,',')+');'
from tbl_column_length C left join sysobjects S on C.TABLE_NAME=S.name
where type='u'
and length <100
and name in('table1')
group by name
That...
December 27, 2022 at 10:38 pm
Viewing 15 posts - 601 through 615 (of 2,648 total)