Viewing 15 posts - 5,536 through 5,550 (of 59,068 total)
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...
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'...
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...
February 27, 2021 at 2:18 am
You bet. Thank you for the feedback.
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.
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,...
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 [
February 26, 2021 at 5:56 pm
I do not consider "2359 to 2359" a valid case, as that might imply it may also span multiple days
Ordinarily, I'd agree but to consider the span...
February 26, 2021 at 5:01 pm
This is why I asked the OP for what they expected if the output were to be displayed...
IF the " - " that leads a NULL value are to NOT...
February 26, 2021 at 4:52 pm
jcelko212 32090 - Thanks, appreciate this. As mentioned, I am relatively new to SQL. I'll continue to read up...
The Dixie Flatline - the result that I am hope for...
February 26, 2021 at 4:19 pm
Three decades ago, I tried posting super consolatory postings. I tried fixing one and only one problem at a time when somebody posted a total mess. I found out...
February 26, 2021 at 4:05 pm
GUIDS are big, fat and ugly... they bloat indexes. 😀
Yep... but they work a whole lot better than trying to gerry rig a concurrent MAX solution for this and...
February 26, 2021 at 2:47 am
Yes, but I just recommended against doing that.
February 26, 2021 at 12:38 am
Gosh, no. Don't change the SET CONCAT_NULL_YIELDS_NULL setting on your server or in your session! Use the CONCAT function instead. Please read the following...
https://docs.microsoft.com/en-us/sql/t-sql/functions/concat-transact-sql?view=sql-server-ver15
February 26, 2021 at 12:06 am
I have to agree with Brian... what is the problem with using something that guarantees you won't have a problem with concurrency such as an IDENTITY column or a SEQUENCE? ...
February 25, 2021 at 11:50 pm
Viewing 15 posts - 5,536 through 5,550 (of 59,068 total)