Viewing 15 posts - 31 through 45 (of 532 total)
Are the records in the tables in question ever updated or just inserted?
October 2, 2012 at 12:06 pm
Jeff Moden (10/1/2012)
Actually, I don't recommend handling this at all. It will break properly spelled names.
+1
Just because you can do something doesn't mean you should. Doing this sort...
October 1, 2012 at 3:31 pm
Is someone a loyalty customer because they have an entry with PurchaseDetails of 'Loyalty Customers' on a particular day, or is that designation inherent to the customer himself/herself?
I think you...
October 1, 2012 at 3:18 pm
I believe that any generated scripts will not prompt for a save. Anything you modify at all should prompt you.
October 1, 2012 at 3:13 pm
Microsoft invested a huge amount of effort/time/money into CLR to give us tremendous capabilities. I have been told by someone close to the SQL dev team at MS that...
September 28, 2012 at 2:08 pm
The first solution I posted above (the first reply to Phil) is a clean "islands" style approach that I don't believe is improved upon by the other similar approaches. ...
September 28, 2012 at 1:41 pm
Thank you my friend.
September 28, 2012 at 11:15 am
Yeah, Mark's is much better. I went to lunch and realized that the much cleaner query had eluded me.
September 26, 2012 at 5:07 pm
Do a web search on "sp_msforeachdb".
September 26, 2012 at 1:59 pm
This solution uses a numbers table in [master].
selectdt.HotelId
,dt.RoomTypeId
,BeginRange = dateadd(dd, min(dt.N), '20000101')
,EndRange = dateadd(dd, max(dt.N), '20000101')
from
(
selectdistinct
rd.HotelId
,rd.RoomTypeId
,n.N
,grp = n.N - dense_rank() over(order by rd.HotelId, rd.RoomTypeId, n.N)
from #RoomDates as rd
join [master].dbo.Nums as...
September 26, 2012 at 1:55 pm
I don't think that the argument should be that string evaluation and manipulation cannot be done in t-sql, it's that they cannot be done nearly as efficiently as they can...
April 7, 2012 at 12:21 am
I may be misunderstanding what you're asking, but in the 2nd article you link he gives a nice example of what will be returned by $action in different situations in...
April 6, 2012 at 11:53 pm
I believe it would be possible but it really wouldn't make sense. There is an overhead to parallelism: the work has to be divided between CPU's and then the...
March 17, 2012 at 12:19 am
Jeff, I'm a bit confused. Are you saying that parameter sniffing is more likely with dynamic sql? I don't understand that to be the case (and I would...
February 26, 2012 at 11:13 pm
I appreciate that you're new to SQL Server and please don't take what I have to say as anything other than me trying to help you learn some things. ...
February 17, 2012 at 1:18 pm
Viewing 15 posts - 31 through 45 (of 532 total)