I have a SQL query that pulls data for charting based on a per month basis. The month range is dynamic and selected from the front end. My issue is when no data for a month within the month range is present, that month is skipped. Is there a way/method to have the query give a 0 value for the columns when no data for that month exists? Below is my current query
By right clicking on my database i created a query in server explorer. But where are this query stored can't find them back. I should aspect that their is a folder query's like there is a folder tables but this isn't the case.
I am trying to create statitics for game downloads and am having dificulty with a sub part of my query. the goup by command is not having the disired result and i think i have been looking at it too long to see what i am doing wrong. [Code]....
At the moment it is producing each result in many rows when only 4 rows should appear. its the download column that is doing it. needs to be sub queried or something to display total in relation to month,gameid,userid.
I am trying to display this query result in an aspx page.
It is very slow in loading. Here is the query. The inner query inside the outer quesry is the problem.(Please see the underlined part in the query) - (If I remove that part it is very fast.)
select
top 500
--This column is the issue ,Governing_Class=( case when exists (select top 1 tqc.class_code from t_quote_class tqc inner join t_quote_class_premium tqcm on tqc.class_code =tqcm. class_code where tqc.appid=pi.appid and tqc.class_code not in('8742' ,'8810','7380') order by tqcm.premium_amt desc ) then ( select top 1 tqc.class_code from t_quote_class tqc inner join t_quote_class_premium tqcm on tqc.class_code =tqcm. class_code where tqc.appid=pi. appid order by tqcm.premium_amt desc ) ......... From tables
I am a biggner in SQL DB . but i started a complicated and painfull work in SQL SERVER 2008. the problem convert Oracle hierarchical query to SQL query. the query
SELECT DISTINCT LEVEL LVL, SCH.NSCHEDULE_SL, SCH.NSCHEDULE_SL_FM, SCH.CSHED_CNAME FROM FA_SCHEDULES SCH WHERE LEVEL = 1 AND NSCHEDULE_SL_FM IS NULL AND NBRANCH_SL = 2 CONNECT BY PRIOR SCH.NSCHEDULE_SL_FM = SCH.NSCHEDULE_SL AND NBRANCH_SL = 2
Trying to get a query going in SQL server but I get bad/ errors in the query.I have a 2 tables. One is the "Project" table while the other is the "Task" table.Table structure is as follows.
A project can have many task. The ProjectID in Task table is the foreign key which reference the project ID.What I need to do is to SUM all the hours in the Task table and group it by quarter and then group it by ProjectID. Output of the SQL should be in the form of projectID,Quarter, Hours.
I have a AJAX calendar control it shows selection for specific date.
However I have an input control to key in just month. Can we modify the behavior of Calendar control to show only month/year selection but not the dates ?
In my asp.net application there is a requirement where there is a textbox and right next to the textbox there is a calender image. When i click the calender image a calender should come up and i should be able to select a date in a month.Normally i could use AjaxcontrolToolkit calender control, but the problem here is that here i have to show two consecutive months together side by side. And there is an arrow at the left side of one month and an arrow at the right side of the other month so that i can navigate to other months.
I have two TextBox controls for start date & end date input. I have to validate that end date is not greater than start date & the difference between start date & end date is not more than 12 months.
I am trying to create a report which is composed of all of the months in a year. My biggest problem is that we do counts for each month. These counts shouldn't change for previous months. They should remain static. But when I run the current month, I want to display the values in the previous months plus my current value. Do I need to create a formula for each month of the year or is there an easier way to capture this information?
For example:
The end of the fiscal year is July 11. I want to check my values for February to see what accounts are open and counted for this month as well as the accounts that are still open from January. These would all display in February. But I want the January account to report the same number (all accounts open in January) it held when I ran it in January. I want to do this for the entire year.
I need to create asp.net web application in which i have to show Calendar that displays all months of year with Navigation buttons like Next, Previous to move on next years months. Is there ficibility to modify asp.net calendar control to show all months of a year?
I am asked to popup the calendar with two months. When a user selects a date, it popups in a textbox. The botton I have now may trigger only one calendar, not two. I saw someone asked the same question, but it didn't get solved. I know that I may code myself with two asp:calendar controls and divs, and play show/hide, but that's more work.
I have requirement to show two calander months in same JavaScript pop up. when user click start date, then open popup window then it should display the current month and next month. then user has to chanse select either this month or next month date in the same window.
I am using Ajax calendar control, my client requesting me to show 2 months at a time when calendar control gets populated. Please tell me how to show multiple months using Calendar control