Viewing 15 posts - 811 through 825 (of 1,825 total)
I see what you are saying, IMO, for the sake of brevity the question is fine.
It would be a much larger book if every question had a footnote for all...
June 18, 2010 at 2:14 am
Derived tables are not temp table (either # or @)
What, i think, that question is doing is drawing a distinction between...
create table #table
(Cola int)
insert into #table
Select cola from tablea
select *...
June 18, 2010 at 2:01 am
Absolutely.
Since 2 is just a subset of 1 , try something like ...
Sum(case when datediff(mn,DateTimeIn, DateTimeOut) < 60 then 1 else 0 end)
Additionally , you may find...
June 18, 2010 at 1:50 am
Try this video from Brent Ozar
http://www.brentozar.com/sql-server-training-videos/perfmon-and-profiler-for-sql-server/
June 18, 2010 at 1:45 am
Cast and Convert can use a series of known formats
http://msdn.microsoft.com/en-us/library/ms187928.aspx
However DDMMYYYY is not one of them , it would be nice if you could provide a User Defined format,...
June 16, 2010 at 5:07 am
Build the date using substring as you have done , but to the format YYYYMMDD and you will be fine.
June 16, 2010 at 4:50 am
Steve ,I like the use of the values clause 😎
June 16, 2010 at 4:47 am
I dont normally post other forums "posted questions getting worse" but this one i had to share.
Q1 ) How to make dateadd subtract.
Q2) How to subtract not 15 but 30...
June 16, 2010 at 3:03 am
An optimal solution would involve changing the query in some way.
SQLServer cant do magic. It is *probably* returning the optimal query plan for the query it has been asked.
June 16, 2010 at 2:59 am
Damn Damn Damn, ive mislaid my sql magic wand.
http://www.sqlservercentral.com/Forums/FindPost937995.aspx
Perhaps if i shouted at the server .....
June 16, 2010 at 2:40 am
Please post DDL, sample data and the code you have so far.
If you do you will probably get better responses.
June 16, 2010 at 1:20 am
sachnam (6/16/2010)
temprary variables like in your case pyhsically remains in RAM.
Myth.
http://scarydba.wordpress.com/2009/10/13/table-variables-are-only-in-memory-fact-or-myth/
June 16, 2010 at 1:16 am
How does
Select TableA.TableAName
from TableA
where TableA.TableAName like 'H%'
union -- ALL (possibly!!)
select TableA.TableAName
from TableA
join TableB
on...
June 15, 2010 at 2:07 am
Viewing 15 posts - 811 through 825 (of 1,825 total)