Viewing 15 posts - 16 through 30 (of 1,244 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 table,...
March 7, 2023 at 1:51 pm
I just wanna know what he actually wants. 😀
Ditto!
March 2, 2023 at 10:37 pm
LOL.. He also wants "random" and "unique"... Given that any randomly generated number always has the potential to collide with another randomly generated number, the base requirements are a contradiction...
March 2, 2023 at 10:29 pm
This is a big topic... To big for a simple forum reply. So rather that dive into details, I would suggest you start with an "adjacency list" model. For example,...
March 2, 2023 at 10:08 pm
p.s. This is really going to be fun when they need another 10 million unique random values to fold into the first 10 million. 😀
It shouldn't be too bad...
March 2, 2023 at 9:31 pm
And, welcome back!
Thanks Jeff... I've haven't actually gone anywhere. I just do more reading than posting these days (mostly due to reading on an iOS devise).
Every once in awhile,...
March 2, 2023 at 9:21 pm
I read it as "the number should be between 10 and 15 digits in length and the first two digits must be 11".
Some clarification from the OP would be helpful.
March 2, 2023 at 8:48 pm
Something like this...
WITH
cte_n1 (n) AS (SELECT 1 FROM (VALUES (1),(1),(1),(1),(1),(1),(1),(1),(1),(1)) n (n)),-- 10
cte_n2 (n) AS (SELECT 1 FROM cte_n1 a CROSS JOIN cte_n1 b),-- 100
cte_n3 (n)...
March 2, 2023 at 8:36 pm
reduce the length to
The numbers should begin with 11. The minimum length of the number should be 10 The maximum length of the number should be 15 Need...
March 2, 2023 at 8:12 pm
Generally speaking… Yes, you can create functions in the master database and referent them from any other database using the 3 part, fully qualified name.
That said, if the function definition...
March 2, 2023 at 1:53 pm
You are 100% correct Jeff. Complete brain fart on my part. Please disregard my previous comment.
January 18, 2023 at 4:22 am
You could create a separate stored procedure that accepts a spid as an input parameter.
The stored proc would be a simple WAITFOR command that waits for a period of time...
January 18, 2023 at 2:10 am
The question is still technically "ambiguous" given that the following also works...
CREATE TABLE #TestData (
int_val int NOT NULL
);
INSERT #TestData (int_val)
SELECT
tvc.int_val
FROM
( VALUES
(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),
...
(1189),(1190),(1191),(1192),(1193),(1194),(1195),(1196),(1197),(1198),(1199),(1200)
) tvc (int_val);
November 21, 2022 at 8:17 pm
Oh, I get that. Just every once in a while, you want to put something together for a "one-off what-if" and thing like this come in handy.
Agreed.
November 14, 2022 at 7:23 pm
Just keep in mid that, "just because you can, doesn't mean you should"... Super long value lists can really eat up compile memory and compile time.
If you want to additional...
November 14, 2022 at 6:12 pm
Viewing 15 posts - 16 through 30 (of 1,244 total)