Viewing 15 posts - 7,126 through 7,140 (of 59,070 total)
I have seen an uuid generator written in Assembler a while ago (which I cannot find anymore unfortunately) but an approach like this is what I'd go for...
May 7, 2020 at 2:52 pm
A recent database I created involves tables where the natural unique keys are several columns wide. Rather than using an IDENTITY or other incremental ID, for the surrogate key...
May 7, 2020 at 2:50 pm
So why did the "new" forum software suddenly quadruple-space old posts? Why does the new forum software not even come close to the right color coding of SQL code especially...
May 7, 2020 at 1:28 am
It's ironic that the best forums on SQL Server in the world are also the worst. I've given up on making suggestions. If it were the usability of the forums...
May 6, 2020 at 6:27 pm
Simply amazing!!
My next question is, is there a good book you would recommend to teach me all these tricks?
Thank you!!
CROSSTABs are a bit of an ancient "Black Arts" method...
May 6, 2020 at 3:00 pm
... start date will always be the month of July. The user will select a @p_startmonth,@p_startyear and @p_endmonth,@p_endyear. ...
I just noticed this. If the start date will always...
May 5, 2020 at 4:31 pm
Like this?
WHERE site_code = @p_site_code
AND datepart(month,observ_date) = @p_startmonth
AND DATEPART(YEAR,observ_date)= @p_startyear
AND DATEPART(MONTH,observ_date) <= @p_endmonth
AND DATEPART(YEAR,observ_date)= @p_endyear
Not SARGable. Answer the question I just posted and let's put this problem to bed.
May 5, 2020 at 3:32 pm
I know how to get data between just startdate and enddate, but I need to select it between just month and year, start month is previous July and current...
May 5, 2020 at 3:31 pm
I have no need for such a thing but the following Google search turned up several.
May 5, 2020 at 3:27 pm
You might consider using an expression like this, which would work with BETWEEN
100 * YEAR(observ_date) + MONTH(observ_date)
e.g. today's value would be 202005
That would make for a non-SARGable WHERE clause.
May 5, 2020 at 3:10 pm
To be honest and except for the use of getting/reserving a number prior to storing an item in a table, most of the reasons the given for using sequences are...
May 5, 2020 at 3:06 pm
stupid question time. when you guys deal with X12 spec files, is there a reasonable argument *against* loading them into tables named for loops/segments/ref numbers?
I get that they are...
May 5, 2020 at 2:54 pm
Lynn,
Thank you for the very kind words. If someone with your knowledge has claimed that I'm their mentor, then I'm truly humbled. To be honest, you're as much...
May 5, 2020 at 2:49 pm
An alternative is like below. Which performs better depends on total data volume and index(es) present:
Edit: I'm at work so I have only a limited time to review all...
May 5, 2020 at 2:27 pm
I don't trust any upgrade. That's why we deploy to Dev, then Staging, and then Prod over a decent period of time. Even then, though, MS fins a way to...
May 5, 2020 at 2:23 pm
Viewing 15 posts - 7,126 through 7,140 (of 59,070 total)