Viewing 15 posts - 61 through 75 (of 1,199 total)
In all seriousness, how do you expect us to be able to say whether this is OK or not without no knowledge about your system or what the impact would...
January 19, 2021 at 12:21 pm
It would also be interesting to see what they were doing in the rest of the query for that particular use of a Numbers table.
Actually, I had to rewrite the...
January 5, 2021 at 9:50 pm
Here is another example based on what I found to day:
SELECT char(n) FROM numbers WHERE n BETWEEN acsii('A') AND ascii('Z')
In the actual example I found when from...
January 4, 2021 at 7:12 pm
I dug around in the system I work with daily and I found:
join numbers n on n.n between p.startYM/100 and p.endYM/100
The values where would be something...
January 4, 2021 at 1:23 pm
Sorry about the incorrect section reference. The time-based tables are in chapter 4.
I guess that in many cases where we are using sequence, we want a sequence, and what number...
January 3, 2021 at 8:54 pm
Typically, I have table with the sequences I need, at least if I need them in more than one place in the database.
I discuss time-based tables in my article here:...
January 3, 2021 at 8:10 pm
how often have you needed to generate a sequence that started with something other than "1" or "0"?
I guess about every time when I wanted a sequence of something time-based:...
January 3, 2021 at 7:26 pm
SSMS does not seem to have any specific category for variables. I don't know if a third-party product like Red Gate's SQL Prompt may offer this.
December 17, 2020 at 4:50 pm
No, and your question is based on a fundamental misconception about numbers in computers. You are confusing what is stored with how it is presented.
Numbers in a computers are stored...
December 14, 2020 at 1:02 pm
The easiest way is to upgrade to SQL 2019 and put the database in compatibility mode 150. I would expect in that case that the function will be inlined which...
December 1, 2020 at 7:06 pm
If this is an interview assignment? A bit hefty in that case. Or is a class assignment, like the final one?
In any case, it sounds like you something you are...
November 9, 2020 at 8:06 pm
Oh, where is my crystal ball again? Couldn't you at least tell us on which column you had the non-clustered index? Even better, share the actual query plans for the...
November 3, 2020 at 9:59 am
So I gave some hints in my post. I also have an article on my web site where I discuss parameter sniffing in more detail, http://www.sommarskog.se/query-plan-mysteries.html.
October 11, 2020 at 9:35 am
Yes, with this pattern you can get problems with parameter sniffing. Say that you first run the SP with @kind = 1 and you pass @startday and @endday as NULL....
October 10, 2020 at 4:54 pm
I can't see any relation to your original question here. You should probably have started a new thread.
There is nothing wrong with the pattern above. In fact, I would say...
October 10, 2020 at 9:38 am
Viewing 15 posts - 61 through 75 (of 1,199 total)