View Complete Post
Hello,
I am using SS2008.
There are many situations in which I need to return a table where the rows are EVERY calendar month between two dates, not just the months where there is data present.
Is there a function that would take a beginning and end date mmddyyyy which would do this?
For example if I wanted 1/2004 through 8/2010?
1/2004
2/2004
3/2004
and so on to
........
6/2010
7/2010
8/2010
Thanks in advance,
John
Hi,
I have a query which has a paging functionality and for which i'm using ROW_NUMBER() function. The order by clause in my rownumber function is dynamic and gets changed all the time when ever the sp is called. It works fine for few columns but for one column which is of datetime datatype, it takes lot of time. Amazing thing is with when i sort by the same column in descending order, the query runs in a sec but ascending order takes lot of time :(.
I tried creating a non clustered index(as i already i have a clustered index on that table) on that datetime column but it did not help me.
Could you please suggest what i can do to improve the performance.
Thanks,
Deepti
Hi all,
I have a dataset 'DS1' below;which is working fine when i execute the query.
SELECT Distinct Name FROM Project_RPT WHERE [MonthName] IN (LEFT(@Month,charindex(' ',@Month))) AND [YEAR] IN ( right(@Month,len(@Month)-charindex(' ',@Month) ) ) -->@Month parameter gives values as follows:
MAY 2010,MARCH 2010..etc
But when I tried to preview the report, Its giving error :
Query failed for dataset 'DS1' . The LEFT function requires 2 argument(s).
Can anyone help me on this?
Regards,
Bharthi
I have written a CLR scalar valued function that queries a table using the context connection. This is working fine as long as the db user has select right on the table that is queried from within the CLR function. If the db user has no select right on the table I am receiving the following error:
The SELECT permission was denied on the object '...', database '...', schema 'StD'.
I do not want to give the user select right on the table. How can I allow the CLR function to query the table without granting select right to the db user?
I have created the assembly with PERMISSION_SET = SAFE. Do I have to apply PERMISSION_SET = UNSAFE or is there any other way?
Thanks and kind regards Sebastian Daser Softfount IT Solutions
Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend