View Complete Post
I have no clue why my query is acting weird
If i try to run it for 1/1/2010 9/30/2010 the query takes around 1min 26 sec and return around a million rows
and If i run for 8/1/2010 to 8/31/2010 it takes forever to it...
basically i am getting data from 5 tables and putting it in a temp table and then updating that temp table 2-3 times with some information and then displaying it.
I am stumped as to why it works fast for a longer date range and runs the snail for a small period of time..
I am in the verge of pulling my hair and going crazy..
any help will be appreciated.
It is required to retrieve the records where ONLY Start Month, Year AND End Month, Year are passed. Trying below SQL to get these with no success.
registrationdate BETWEEN(MONTH((registrationdate) = 01) AND (Year(registrationdate)= 2009)) AND ((Month(registrationdate) =03) AND (Year(registrationdate)=2010))
Help is appreciated.
Hi, most time dimensions are setup using a base Date field in the fact table, and they have plenty of issues for time analysis as it is. However my fact sales records have the time aspect assigned by pre-calculated periods, because depending on various
factors, monthly final invoices are all raised on varying days (usually 2nd friday of month but can change). The monthly period is therefore not a straight calendar month. Probably a very common scenario.
So, the invoicing system already assigns the year (ie 2009, 2010, 2011) and monthly period (1, 2, 3 ... 12 with 3 representing march, even though that might represent 13th march to 9th april) and I want to use those as Time dim so we can do YTD, growth-on-prev-year
It looks like its best to setup 2 Dimensions to link to 2 DataColumns/Attributes in the Fact table (say, FYear and FMonth, both integers). That way I can assigned attribute names like March to key column 3. If I combined them into 1 dimension with both fields
making up a single key column, would have to either repeat the month names or link it to another Star schema I believe.
I can use the Add Business Intelligence wizard to make the Dimensions into Time ones instead of regular but I'm still not totally sure if this is the best structure/method and once done, how to use the YTD calcs to show in the cube browser (and my MDX knowle
from my sql blogs table, I want to generate blog archive section on my master page. like;
january, 2010 (20)
fabruary, 2010 (35)
I cannot come up with a linq to sql query on this. do you have any idea how it can be done ?
I've created a matrix report that displays the quantity of different products set to expire by month/year. The stored procedure returns records for a variety of products and each record contains an expiration date. If there are no products/records that contain an expiration date of lets say 6/2010 then 6/2010 will not appear as a column in the report.
I need a way to force these month/year columns to appear in the report.
Does anyone have a suggestion on how I can make that happen?
This seems to be a bug when the crawler search the user profiles in MOSS 2007. When crawled, user profiles with a SPS-HireDate in the months of January, April, August and December will be detected, but a full-text (SQL) search returns those profiles
without the HireDate field.
User profiles with HireDates in other months work correctly, returning the HireDate in the search. And changing the month of a problematic user profile also fixes the problem.
This problem is also reflected in the fact that while we have 499 user profiles using the SPS-HireDate property, the managed property page from the search section only has 350 items with the HireDate property.
We're running MOSS 2007 32bit with SP2 with an English language base and the Spanish language pack. I'd considered date format problems, but I can't imagine how some months would work, while others wouldn't.
I'm building a report in Crystal Reports using a SQL command against a T-SQL 2005 telephony database.
I need to be able to run the query across a given datetime range, 6 months for example and bring back a 5 day display (Mon-Fri) with a group for every 15 minute interval in each day.
The group figures need to contain an average of the amount of calls presented for each 15 minute interval on any day across the whole datetime range, so for example the Monday 10:00 - 10:15 figure would be an average of all calls presented in every 10:00-10:15
range on each of the Mondays that fall within the datetime range.
I've got a query built now that gives total presented figures grouped by these intervals across one week but I can't figure out how to do this average function across a range.
Does anyone have any idea how I'd go about accomplishing this? I'm pretty new to SQL but keen to learn so any pointers on functions to research etc would be very much appreciated.
Thanks alot in advance, Andy.
Query for detail view across one week included below for table/fields etc...
count(DISTINCT Calls.SessionID) as Presented, min(Calls.startDateTime) as DateTime
INNER JOIN QueueDetail
ON Calls.sessionID = Queues.sessionID
AND Calls.sessionSeqNum = QueueDet