Viewing 15 posts - 16 through 30 (of 3,542 total)
It’s been a while since I last did sql admin. SQL server configuration manager will tell you what account it is using. If it is a domain account ie AD, make...
February 22, 2023 at 9:57 pm
They way he/she is doing it, it doesn't need to be unique. It only needs to reduce the number of records that need to be scanned at low cost.
This...
February 22, 2023 at 9:03 pm
Full text indexes are an option. Although, in all honesty, I hate 'em. Hard to maintain and frequently don't actually speed things up much, if at all. Extra storage....
February 22, 2023 at 8:41 pm
I wrote some T-SQL to read the first row (which contained the column names) and had it create a CREATE TABLE statement from that header and the BCP Format...
February 10, 2023 at 10:25 pm
I think most folks would say your confused, David. They rather think I should be IN an institution. 😀 😀 😀
LOL. Maybe we could be in the same room...
February 8, 2023 at 1:57 am
David Burrows wrote:That’s why I like you Jeff, you’re such a smart guy 😍🥳
Heh... if I were really smart, I'd just up and retire. That would probably kill me though.
Just...
February 8, 2023 at 1:37 am
It apparently cannot make the distinction between "temp tables" and "temporary tables". It's seriously incorrect for what most of us refer to as "temp...
February 8, 2023 at 1:19 am
Jeff Moden wrote:As I said on another thread, I've never seen an "automatic bullshit grinder" before. 😀
Thats because you’ve not met me 😳
BWAAA-HAAA-HAAA!!! You're on my bucket list, Mr....
February 7, 2023 at 11:54 pm
As I said on another thread, I've never seen an "automatic bullshit grinder" before. 😀
Thats because you’ve not met me 😳
February 7, 2023 at 11:47 pm
Maybe I'm still suffering from insufficient caffeine levels this morning, but I have to admit, David, I'm confused. Why did you change the row numbers from what the op...
January 13, 2023 at 5:15 pm
WITH cte AS (
SELECT[Table].*
FROM (VALUES
(1,NULL,'2022-12-01T14:10:37.050',NULL,1),
(1,NUll,'2022-12-02T12:10:31.070','Hold',2),
(1,NULL,'2022-12-06T11:18:52.040','Load',3),
(NULL,10,'2022-12-04T15:14:14.050','Review',1),
(NULL,10,'2022-12-05T09:22:46.150',NULL,2),
(NULL,10,'2022-12-15T10:15:18.520',NULL,3),
(NULL,10,'2022-12-17T09:22:46.150','Buy',4)
) [Table] (CustId,LeadId,[Date],Advice,[Row])
)
SELECT cte.CustId,cte.LeadId,cte.[Date],cte.Advice,cte.[Row],ISNULL(c.Advice,l.Advice) AS [NewAdvice]
FROM cte
OUTER APPLY (
SELECT TOP(1) cte2.Advice
FROM cte cte2
WHERE cte2.CustId=cte.CustId
AND cte2.Advice IS NOT NULL
ORDER BY ABS(DATEDIFF(minute,cte.[Date],cte2.[Date])) ASC
) c
OUTER APPLY...
January 13, 2023 at 2:48 pm
Use a different Row Delimiter
January 5, 2023 at 4:45 pm
Happy new year everyone! 😎 May the source be with you 😉
Same to you, ol' friend. Glad I got to know you and others from this site. Missed...
January 3, 2023 at 1:00 pm
Use delimited split using pipe as delimiter and then use MOD to select 1st and 3rd items
November 11, 2022 at 7:00 pm
Step 1 would be to query just the view to see if the date range returns anything. Then add a piece of your query for one of the joins...
August 3, 2022 at 7:18 pm
Viewing 15 posts - 16 through 30 (of 3,542 total)