Viewing 15 posts - 46 through 60 (of 5,109 total)
Are you saying that the collation impacts the formatting of the date? I haven't really used smalldatetime, that seems like a very microsoft accessy problem to have
The collation, no,...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 11, 2023 at 2:45 pm
The fields listed in the SELECT clause are a subset of the fields in the GROUP BY clause. What you said about DISTINCT is only necessarily true if the...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 11, 2023 at 2:00 pm
Why are you using DISTINCT and GROUP BY in your first query out of interest? GROUP BY already puts your data into distinct groups, so the DISTINCT in the SELECT...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 11, 2023 at 11:50 am
select @v=activityname from activity order by activityid
That will assign every value of activityname to the variable @v, but as the variable is a scalar value, it...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 11, 2023 at 10:52 am
One of my biggest pet peeves about (small)datetime is its handling of the format yyyy-MM-dd( hh:mm:ss) as it is ambiguous. For those using American as their language they are "fine",...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 11, 2023 at 10:39 am
please tell me is there anything wrong in first query or should I go for second one or use some with cte etc. etc.
The method you have used in...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 11, 2023 at 10:11 am
That (now removed) ChatGPT "solution" was amazing garbage...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 9, 2023 at 2:31 pm
If you're on 2022 then you could use DATE_BUCKET:
WHERE YourDateTimeColumn >= DATE_BUCKET(DAY,1, GETDATE(), CONVERT(datetime,'19000101 16:00:00'))
AND YourDateTimeColumn < DATEADD(DAY, 1, DATE_BUCKET(DAY,1, GETDATE(), CONVERT(datetime,'19000101 16:00:00')))
Another method would...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 5, 2023 at 11:47 am
This is literally just a "has anyone else had this thought?" question but I was wondering about "catch-all"/"kitchen-sink" queries at the weekend, and new features of Query Store with the...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
April 3, 2023 at 4:25 pm
Any fix regarding this thread?
We are frequently facing this issue.
Considering this is a 12 year old thread, I'd suggest either starting a new one as things could easily have...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
March 14, 2023 at 4:47 pm
You're assuming an INSERT/UPDATE only ever effects one row; this is completely untrue. You are then trying to assign values to your scalar variables from CROSS JOINed queries. Take your...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
March 14, 2023 at 3:21 pm
I was trying to reply to 3 different posts. The way the responses showed up looks like i just put a similar answer 3 times together.
If you want to...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
March 9, 2023 at 3:58 pm
Using the 'CoPilot' version of ChatGPT ( that is an addon to Microsoft Visual Studio) trained in programming and with access to the data sources this is possible now.
As...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
March 8, 2023 at 8:52 am
Honestly, the fact that ChatGPT makes the mistake of thinking that people age on 01 Jan, which is such a fundamental error, show that it can't be relied on when...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
March 7, 2023 at 2:41 pm
Secondly, the data was imported from excel in hh:mm format but it is coming up in sql as varchar.
I have tried casting it as int in sql to...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
March 6, 2023 at 9:02 am
Viewing 15 posts - 46 through 60 (of 5,109 total)