Viewing 15 posts - 466 through 480 (of 2,645 total)
If that's what is coming out of ChatGPT, then my job is still safe for the time being.
All 3 of CGPT queries are doing an update of the entire...
March 7, 2023 at 2:34 pm
You can get an answer to your question by just pasting it into ChatGPT:
Query 1:
UPDATE [SF_Title_Update]
SET [Title_Proper] =
CASE
...
March 7, 2023 at 1:18 pm
Sorry, my bad. It works. Thanks for all the replies.
Please let me know how long the procedure takes with the updated SQL.
March 6, 2023 at 7:53 pm
I corrected that in my previous comment.
;WITH CTE AS
(
SELECT DISTINCT [VID],[OrdDate],[Prg1],[Prg2],[Prg3],[Prg4],[Prg5],[Prg6],[RowUpdatDateTime]
FROM #new
),
CTE2 AS
(
SELECT...
March 6, 2023 at 7:41 pm
UPDATE t
SET t.Title_Update = CONCAT(T1.Descr, T2.Descr)
FROM YourTable t
CROSS APPLY(VALUES (CASE
...
March 6, 2023 at 6:36 pm
When you do the insert you just need to select the most recent row for that [VID] on the #new table.
You can do this with a CTE, for the example...
March 6, 2023 at 4:41 pm
Not that carefully. I've just typed in roughly the same question as I can't remember exactly what it was, also ChatGPT has some randomness built in so doesn't arrive at...
March 6, 2023 at 4:19 pm
You might need some new statistics. Put the query into "Database Engine Tuning Advisor" in SSMS and see if it suggest some new statistics.
March 6, 2023 at 3:31 pm
What errors does it give?
Do we have to find your previous post to work out what to do in this question?
March 6, 2023 at 10:57 am
I can't say I have ever used RIGHT JOIN. I think it is only in the language for completeness.
March 6, 2023 at 10:53 am
This does the same thing:
Are you sure? I struggle to understand cursors ate the best of times, but I think the set based solution...
March 5, 2023 at 12:46 am
Given the OP stated "I run a script that brings the data that was modified in the last 24 hours from the 3rd party system" I assumed that the data...
March 5, 2023 at 12:21 am
I believe it's acceptable to use either singular or plural names for database table names,
Acceptable, perhaps. But can you name any major RDBMS that...
March 4, 2023 at 2:00 am
I run a script that brings the data that was modified in the last 24 hours from the 3rd party system.
This table contains about 500,000 records for each day.
Then...
March 4, 2023 at 1:44 am
Where do you want to do the process? In Excel or in SQL Server?
It is the tradition on this forum that the poster of the question supplies the data in...
March 3, 2023 at 11:06 am
Viewing 15 posts - 466 through 480 (of 2,645 total)