Viewing 15 posts - 5,566 through 5,580 (of 59,089 total)
To me, it's a bit funny that someone would say that they're "less reliable" than views... they are one of the few things that operate precisely the way they're documented...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2021 at 3:25 pm
The name common table expression comes from the way that you factor it out of multiple positions in a query expression and move it to the front. By...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2021 at 3:19 pm
Any thoughts on the pluses or minuses of using a temporary table versus a CTE? Would the size of the "virtual view" be a consideration.
Sure...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 28, 2021 at 6:16 pm
The name common table expression comes from the way that you factor it out of multiple positions in a query expression and move it to the front. By analogy,...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 28, 2021 at 4:51 pm
BWAAAA-HAAAAA! 😀 Let's not because then someone would want to rename iTVFs as PDIVs (Parameter Driven Inline Views). 😀
(THUMBS-UP) If it helps to leave the misconception behind,...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 28, 2021 at 4:47 pm
With such a name, CTE were kind of made for misconceptions. Could we rename them LVR (Local View with Recursion)?
BWAAAA-HAAAAA! 😀 Let's not because then someone would want to...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 28, 2021 at 12:59 pm
Thank you for the reply. I tried that and the values in the original column are still the same. Should that have output to a new column? I created...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 28, 2021 at 12:52 pm
In my company's case we use that date of 2078-12-31 as the maximum date because there are fields in some tables that are defined as SMALLDATETIME and since the...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 27, 2021 at 8:10 pm
Rewriting it using the temp table is an option I did consider but was hoping for one of those “a ha” moments ??
The "a ha" moment is in 2nd...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 27, 2021 at 6:35 pm
I am using SQL server 2008 R2 express edition.
Out of below 3 method which method is efficient to fetch count ?
1.select name,count * from table where name contains 'raj'...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 27, 2021 at 6:33 pm
That's some very clever code on the part of both. The only trouble with that code is that it contains date literals which are based on the content of the...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 27, 2021 at 2:18 am
You bet. Thank you for the feedback.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 26, 2021 at 8:11 pm
Not at all. sys.dm_exec_sql_text() returns the database ID... use it in conjunction with what I posted about OBJECT_NAME() above.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 26, 2021 at 6:43 pm
This is great.. I am making progress and learning. LOL.
Can I do this, within the same statement?
IIF(var1Title != '', CONCAT(var1Title, ' - '+var1Topic, ' - '+var1Name), '') AS Item1,...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 26, 2021 at 6:34 pm
Since it appears that you may be working from a different database via the code, here's a possible hint from the documentation on OBJECT_NAME (emphasis is mine)...
OBJECT_NAME ( object_id [
--Jeff Moden
Change is inevitable... Change for the better is not.
February 26, 2021 at 5:56 pm
Viewing 15 posts - 5,566 through 5,580 (of 59,089 total)