Viewing 15 posts - 391 through 405 (of 424 total)
btw, the reason you received the error is that a derved table in the from clause cannot see any other members of the from clause.
[font="Courier New"]
SELECT P.street_number_full AS StreetNumber, P.street_pre_direction...
January 18, 2008 at 2:15 pm
take a look at this thread: http://www.sqlservercentral.com/Forums/Topic436572-338-1.aspx
January 18, 2008 at 1:54 pm
re: Samuel Vella
yup, you're right -- 1 per month. i've been doing a rebuild/release all night and letters and digits are starting to run together. 😀
still, how does...
January 16, 2008 at 8:21 am
re: Samuel Vella
that query does not seem to only consider sellers who have sold at least 3 items in each of the past 3 months. have i misinterpreted the...
January 16, 2008 at 7:53 am
January 16, 2008 at 2:59 am
it doesn't sound that simple. you're going to need some intermediate summary to determine sales by month.
declare @startDate smalldatetime, @endDate smalldatetime
set @startDate = dateadd( month,-3,getdate() ) -- 3 months...
January 16, 2008 at 2:54 am
Raghs (1/15/2008)
Try this..SELECT MONTH(OrderDate), COUNT(CustomerID) As ActiveCustomers
FROM v_Customer -- VIEW
GROUP BY MONTH(OrderDate)
ORDER BY OrderDate
need to change it to something like this:
SELECT YEAR(OrderDate) as year, MONTH(OrderDate) as month, COUNT(DISTINCT CustomerID)...
January 16, 2008 at 2:23 am
aysegul (1/15/2008)
But it doesn't work as I want.
I want to filter by with dbo.fDetermineStartDate return value when
fDetermineEndDate is...
January 15, 2008 at 7:42 am
kipp (1/14/2008)
January 14, 2008 at 9:00 am
I suggest you try using a couple of user defined functions to replace the case statements.
create function dbo.fDetermineStartDate( @status int, @dueStartDate datetime, @actualStartDate datetime )
returns datetime
begin
return...
January 14, 2008 at 8:10 am
GSquared: With my biggest complaint nullified, I'm all for the numbers approach.
And it's just that for my usage (big decision support queries) a 50ms improvement isn't thrilling....
January 8, 2008 at 3:46 pm
GSquared:
I must be missing something. Per your own tests, the Numbers-based string parser was 2-3 times faster than the While loop parser every time. Yet you say its speed doesn't...
January 8, 2008 at 8:34 am
Jeff Moden (1/7/2008)
antonio.collins (1/7/2008)
i don't think a numbers table is ever necessary.What do you use SQL Server 2000, instead?
ss2k5. as shown in my earlier examples, the numbers table isn't...
January 8, 2008 at 7:15 am
GSquared: totally agree on your points save one -- i don't think a numbers table is ever necessary. but i'll read your references since i'm sure i'll learn...
January 7, 2008 at 7:12 pm
GSquared: I really like stuff like this, so I hope you're not annoyed with another reply.
But I don't think the numbers table is giving you enough bang...
January 7, 2008 at 3:39 pm
Viewing 15 posts - 391 through 405 (of 424 total)