Executing Reports On Daily And Monthly Basis

Sep 21, 2007



Hi All,

I'm creating 15 reports based on one data source.
Once I created, I'm supposed to run this on daily and monthly basis. I'm going to use snapshot option in Report Manager. Is it fine?
Do I need to create a data base too?

Also when I change the target URL address in the report property box, can I deploy it to any other server? Do I have to change the settings of report configuration manager too, inorder to publish reports on another server(not in my local machine)

I really appriciate answers for these questions

Thanks

View 5 Replies


ADVERTISEMENT

Transfer Data In Monthly Or Adhoc Basis

May 7, 2012

I have 10 oracle o/p tables. I have to transfer data in monthly or adhoc basis. Each table will have millions of records. How to transfer Oracle to SQL Server 2005. Which is the best way to transfer the data.

View 2 Replies View Related

DTS - Dataimport On A Daily Basis

Apr 3, 2000

I have to import data into 2 tables on a daily basis.
The data is provided as a flatfile.
In order to fullfill this task the tables have to be truncated first.
Are there any possibilities to do this job automatically with dts, or do I
have to write an Interface
in VB or something like that?

Thanx

Michael F.

info@sunguard-explorers.de

View 2 Replies View Related

How Xml Could Help Us With Our ETL Processes On Daily-basis?

May 26, 2006

Hi all of you,

I'm just a newbie with XML. Now we're moving all our DTS to SSIS packages. Most of them are simply processes that takes a plain file and loading these data into Sql table or in inverse way. So that I wonder what role will play XML here.

I mean, are there big differences between store data as XML format and nvarchar?

That sort of stuff.

Thanks in advance for any input,

View 5 Replies View Related

SQL 2005 Sps Need To Be Recompiled On A Daily Basis Why?

Aug 16, 2006

Hi All,

I have recently upgraded one of our servers using the in place upgrade method to SQL Server 2005 from SQL Server 2000.

We are currently having an issue with stored procedures as they appear to be running slowly and the only way to correct this issue is to recompile them on a daily basis.

Has any one else had a similar issue, any ideas what could be causing this to occur.

Thanks.

View 1 Replies View Related

Scheduling DB Restore On Daily Basis

Sep 27, 2013

I need to be able to restore a test db from a production db on a daily basis..

View 3 Replies View Related

Compound Return On A Rolling Daily Basis

Nov 2, 2014

Looking to create a query, as simple as possible, that allows me to compound returns on a rolling daily basis. So far this this have I have:

DECLARE @stock_returns TABLE
(
stock_code VARCHAR(10) NOT NULL,
date1 DATE NOT NULL,
daily_return NUMERIC(10, 2) NOT NULL
);

[Code] ....

But I´m not getting what I need. If you run the above select, the output should be:

stock_codedate1daily_returnLAGCompound_return
stock12014-07-080.00510 0.00000 0.0051000000
stock12014-07-090.00300 0.00510 0.0081153000
stock12014-07-100.00500 0.00300 0.0080150000
stock12014-07-110.00600 0.00500 0.0110300000
stock12014-07-120.00200 0.00600 0.0080120000
stock12014-07-130.00700 0.00200 0.0090140000
stock12014-07-140.00240 0.00700 0.0094168000
stock12014-07-150.00240 0.00240 0.0048057600
stock12014-07-160.00250 0.00240 0.0049060000

The problem is with this column:

(lag(daily_return, 1, 0) over (order by date1) + 1) * (daily_return + 1) - 1 as Compound_return

The (daily_return + 1) portion should be the accumulated compound return. So it should be something like

(lag(ACCUMULATED_COMPOUND RETURN, 1, 0) over (order by date1) + 1) * (daily_return + 1) - 1 as Compound_return

And the output should be:

Date1Daily returnLAGCompound Return
08/07/20140,00510,00000,0051
09/07/20140,00300,00510,0081
10/07/20140,00500,00300,0132
11/07/20140,00600,00500,0192
12/07/20140,00200,00600,0213
13/07/20140,00700,00200,0284
14/07/20140,00240,00700,0309
15/07/20140,00240,00240,0334
16/07/20140,00250,00240,0359

View 10 Replies View Related

Getting Daily Average Of Sales From Monthly Report?

Oct 9, 2014

I have this small project, I have this report that have the total of order along with the date of the order

SELECT sf.ORDER_QNT, dd.ACTUAL_DATE, dd.MONTH_NUMBER
FROM sales_fact sf,
date_dim dd
WHERE dd.date_id = sf.date_id
AND dd.MONTH_NUMBER = 1;

ORDER_QNT ACTUAL_DATE MONTH_NUMBER
1100 05/01/13 1
100 05/01/13 1
140 06/01/13 1
110 07/01/13 1
200 08/01/13 1
500 08/01/13 1
230 08/01/13 1
500 08/01/13 1
200 08/01/13 1
53 15/01/13 1
53 22/01/13 1

Now, I want to get the average for that month (average per day).

SELECT sum(sf.ORDER_QNT)/31 as AVGPERDAY
FROM sales_fact sf,
date_dim dd
WHERE dd.date_id = sf.date_id
AND dd.MONTH_NUMBER = 1;

AVGPERDAY MONTH_NUMBER
---------- ------------
113.785714 1

but instead putting 31, I'd like to pull the totaldays from the actual_date using the Extract function so I try this

SELECT sum(sf.ORDER_QNT)/EXTRACT(DAY FROM LAST_DAY(to_date('05/01/13','dd/mm/rr'))) as AVGPERDAY,
dd.month_number
FROM sales_fact sf,
date_dim dd
WHERE dd.date_id = sf.date_id
AND dd.month_number = 1
GROUP BY dd.month_number;

AVGPERDAY MONTH_NUMBER
---------- ------------
113.785714 1

The result is nice, but now when I change the date with the dd.actual_date it gives error

SELECT sum(sf.ORDER_QNT)/EXTRACT(DAY FROM LAST_DAY(dd.actual_date)) as AVGPERDAY,
dd.month_number
FROM sales_fact sf,
date_dim dd
WHERE dd.date_id = sf.date_id
AND dd.month_number = 1
GROUP BY dd.month_number;
Error at Command Line : 1 Column : 53

Error report -
SQL Error: ORA-00979: not a GROUP BY expression
00979. 00000 - "not a GROUP BY expression"

View 1 Replies View Related

Daily Report Generating Monthly Rollup Stats

Jan 2, 2007

Daily report generating Monthly rollup stats

I have a daily report which each morning generates monthly information for the current month which was implemented in December. Everything was working correctly untill January 1st. On the 1st the report generated blank since it was suppose to generate 1-31 Dec but but the currently month was Jan, so it failed. How do I program it so if it is the 1st of a month generates the previous month but still would generate current month but while in the current month? Any help is appreciated.


SELECT GETDATE() - 1 AS rptdate, Errors.WTG_ID, lookup.Phase, Errors.STATUS_TYPE, Errors.STATUS_CODE, STATUS_CODES.STATUS_DEF, Errors.TIME_STAMP,
Errors.ANSI_TIME, lookup.WTG_TYPE, Errors.POSITION
FROM Errors INNER JOIN lookup ON Errors.WTG_ID = lookup.WTG_id RIGHT OUTER JOIN STATUS_CODES ON Errors.STATUS_CODE = STATUS_CODES.STATUS_CODE AND lookup.WTG_TYPE = STATUS_CODES.WTG_TYPE
WHERE (STATUS_CODES.STATUS_DEF IS NOT NULL) AND (Errors.TIME_STAMP BETWEEN DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0) AND DATEADD(mm, DATEDIFF(m, 0, GETDATE()) + 1, 0))
ORDER BY Errors.WTG_ID, Errors.TIME_STAMP, position

View 5 Replies View Related

Transact SQL :: Email Notification Of Count Of Pending And Suggested Name On Daily Basis

Oct 23, 2015

I have a query which sends email notification of count of pending name and suggested name.. on a daily basis. So this works fine but now I want like if the pending and suggested are ' o count' I don't want the email notification. It should not send an email, if it is o count, but if we have the number for pending and suggested this email should be sent.

View 8 Replies View Related

Select Daily, Monthly, Weekly, Quarterly And Yearly Values For Graph Report

May 28, 2008



Hi



I am very new to analysis services and using MDX.



I want to select data from a cube using an MDX statement and show the data on a graph report.



I want to select the daily, weekly, monthly and quarterly descriptions all in one column to make it easy to represent it on the report.



Then set the 'Date' Column to the x-axis and the Value column to the y-axis.



The user also must have the option to not show certain periods (Switch of daily and weekly)



My MDX works when I select from the SQL Management Studio but as soon as I copy the MDX over to the SSRS Report Designer is splits the daily, weekly, monthly, quarterly and yearly values into seperate columns which makes it very difficult to report on.

----
Code



SELECT NON EMPTY { ([Measures].[ValueAfterLogic])} ON COLUMNS,

NON EMPTY { [KPI Values].[KPI Name].[KPI Name].ALLMEMBERS * ORDER(

CASE 1 WHEN 1 Then [Time].[Hierarchy].[Day Of Month] ELSE NULL END +

CASE 1 WHEN 1 Then [Time].[Hierarchy].[Week Of Year Name] ELSE NULL END +

CASE 1 WHEN 1 Then [Time].[Hierarchy].[Month] ELSE NULL END +

CASE 1 WHEN 1 Then [Time].[Hierarchy].[Quarter Of Year Name] ELSE NULL END +

CASE 1 WHEN 1 Then [Time].[Hierarchy].[YEAR] ELSE NULL END,

[Measures].[ValueAfterLogic],DESC)

}

DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM

(SELECT ( {[KPI Values].[KPI Id].&[{97754C54-AB43-403D-A2C2-21C04BDE93E3}] } ) ON COLUMNS

FROM [Workplace])

WHERE ( [KPI Values].[KPI Id].&[{97754C54-AB43-403D-A2C2-21C04BDE93E3}])

CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS



The case statement will take paramter values when finished

----------------end of code portion



Is this possible or is it suppose to 'split' the columns when moving to SSRS.





Thans in advance

Dev environment - SQL 2008 Feb CTP, VS 2008

View 5 Replies View Related

Reporting Services :: Daily / Weekly / Monthly And Yearly Parameter For Scheduled SSRS Report

Jan 7, 2011

Currently, I have a report that takes two parameters:  StartDate and EndDate.  

I would like to schedule the report to run on a Daily, Weekly, Monthly or Yearly basis, but this doesn't work too well with StartDate and EndDate because the parameter is static.  What is the most elegant way to implement this change?

View 5 Replies View Related

How To Display Data At Bottom Of Report By Daily, Weekly, Monthly, SYTD Using Ssrs Report

Dec 14, 2007

hai iam new to ssrs, please help me.


i have student billbale information assume what ever data it. i need to to dispaly total amount for the student at

Bottom Of Report By Daily, Weekly, Monthly, SYTD . take any example, i want to know formula.

thanks to advanced

Jacks v

View 1 Replies View Related

Breaking Monthly Values Down Into Daily Values

May 18, 2007

Hi all, I'm new to MDX and am getting very confused with a script.

I'm running into problems breaking down monthly measures to daily values. If I have a monthly measure of 50, I would like to divide it by the number of days in the month to come up with daily values.

I believe I have set the proper granularity for the measurement relationship against the time dimension and have added the following script to my MDX script:

[Date].[Date].Members = [Measures].CurrentMember / [Date].[Calendar].CurrentMember.Parent.Children.Count

When I submit a query like this:

SELECT [Measures].[Measurement Objective] ON 0,
MTD([Date].[Calendar].[Date].&[20070207]) ON 1
FROM [Cube]

Everything looks good. The query returns seven rows, each with a properly scaled version of the monthly measurement. However, when I write the following query to return a single MTD value:

SELECT [Measures].[Measurement Objective] ON 0
FROM [Cube]
WHERE MTD([Date].[Calendar].[Date].&[20070207])

It doesn't work. It gives me the error:

The MDX Function CURRENTMEMBER failed because the coordinate for the
'Calendar Year' attribute contains a set

I'm sure this is just a matter of me misunderstanding MDX. Any help would be appreciate.
Thanks,
Richard

View 5 Replies View Related

Aggregate Daily Reports Into Weekly, Etc.

Nov 30, 2007

Dear Forum Community,

I am new to this forum (actually to forums in general). I apologize for the long post, but I feel that someone must have done all this before and perhaps there are better approaches, so I felt I had to explain my objectives.

I have written a Daily(date) report for all the pertinent data in our production database. We want this data to persist for two years and be easily accessible. We also want other reports to use this data as a datasource rather than the production data because the production database is periodically purged of old data that may be of interest to these reports. So I am using SSRS not only as a reporting tool but also a sort of historical database.

To persist the daily report I added a Yesterday report that includes the Daily(date) as a subreport. The Yesterday report uses yesterday's date and has no paramters so it can be set up to run as a snapshot and be stored in the history. Daily(date) is set to use the cache which expires after 7 reports. So far so good.

I have now created a Weekly(weeknumber) report that includes 7 Daily(date) subreports and a LastWeek report that is schedule to run weekly as a snapshot and is stored in the history. I am hoping that because the Daily(date) reports have already been run by the Yesterday report, their datasets will still be in the cache and this will not cause a refresh from the production database. Am I right?

Basically, I want to keep access to the production database to a minimum, not store (much) duplicate data in the Report Server database and yet still have quick and easy access to the data going back 2 years even though it has long since been purged from the production database.

I considered to use the 7 daily reports as a datasources for the weekly report so that I could aggregate the data each week and expire the daily reports (and again for months, quarters and years). However, I was unable to figure out how to use a report as a datasource.

My questions come down to these...


Will the approach I am pursuing work?

Is it the best approach?

If a report includes subreports that have already been run individually with the same parameters, will the cached subreport be used.

How do you use an existing reports as datacsources for an aggregated report?
I look forward to hearing your suggestions.

Dave

View 3 Replies View Related

Executing Multiple Simultaneous Reports

Oct 15, 2007

Is there a way to get the Report Manager to allow a single user to
execute more than 1 report at a time? Currently, each user can only
have a single report being executed at a time. It looks like any
other reports are being queued and executed serially.

View 1 Replies View Related

Error While Executing Reports From Report Manager

Feb 1, 2007

Hi..

I have deployed reports on to the report server. When I try to open the reports from report server, I get the error," Value does not fall within the expected range." This error message appears as soon as I click on any report on the report manager.

I am not able to find the cause of the error.

Does anybody have any suggestions?

Thanks ,

Viva

View 4 Replies View Related

Interactively Showing Reports Detailing Results/stats Of Executing A Package?

Jun 3, 2006

Hi,

I'm just starting out with SSIS and I'm currently looking to migrate some non-SSIS ETL processes to SSIS. Some of these processes are run manually depending on the results from a previous step. In these processes a user remotely executes an individual ETL program and is shown reports detailing the result of the program and various statistics about the data involved.

Is it possible to replicate this behaviour with SSIS / SSRS, or would the user have to execute a package and then manually find and bring up each of the relevant reports?

I'm new to SSIS and I'm still struggling to find out SSIS's capabilities, so I'd be really grateful if anyone could shed some light on this...

Thanks in advance,
Lawrie.

View 1 Replies View Related

Stored Procedure Executing Durations Are Different Between Executing From Application(web) And SQl Server Management Studio - Qu

Jan 24, 2008



Hi,

I have a web application using Stored Procedure (SP). I see that there's a SP taking long time to execute. I try to capture it by Profiler Tool, and find out that with the same SP on the same db with the same parameter. The duration of executing by my web app is far bigger than the duration of executing on SQl server management studio - query window

Please see the image through this url http://kyxao.net/127/ExecutionProblem.png


Any ideas for this issue?

Thanks a lot

View 1 Replies View Related

Stored Procedure Executing Durations Are Different Between Executing From Application(web) And SQl Server Management Studio - Query Window

Jan 23, 2008

Hi,I have a web application using Stored Procedure (SP). I see that there's a SP taking long time to execute. I try to capture it by Profiler Tool, and find out that with the same SP on the same db with the same parameter. The duration of executing by my web app is far bigger than the duration of executing on SQl server management studio - query windowPlease see the image attached http://kyxao.net/127/ExecutionProblem.png Any ideas for this issue?Thanks a lot Jalijack 

View 2 Replies View Related

Different Results When Executing From .NET Component Compare To Executing From SQL Management Studio

Oct 10, 2006

Hi all,I am facing an unusual issue here. I have a stored procedure, that return different set of result when I execute it from .NET component compare to when I execute it from SQL Management Studio. But as soon as I recompile the stored procedure, both will return the same results.This started to really annoying me, any thoughts or solution? Thanks very much guys

View 2 Replies View Related

Basis SQL Question

Mar 21, 2008

How do I format a date value in SQL 2000 sp?  Tired the following none are returning the quivilent rates.  What is the syntax please?
SELECT *FROM tblCompanyWHERE ( C_LastBuyDate = '03/21/2008')
SELECT *FROM tblCompanyWHERE ( C_LastBuyDate = '2008/03/2008')
SELECT *FROM tblCompanyWHERE ( C_LastBuyDate = '03-21-2008')

View 3 Replies View Related

Update On Basis Of Another Table

Apr 12, 2007

hello guys !
i need a little help in an update statement.

i have two tables as

table1(id1,name)
table2(id2,date,val2)

what i want is to set val2=45 in table2 where date=4/4/2007 (say) and id2, now id is to be obtained from table1 based on the name;

like
table1
---------
(1,"akmal")
(2,"peter")
(3,"kamal")

I know the name as peter, but i want to used its id1 (2) in the update statement. You might have got the idea that id2 is a foreign key referring to id1.

How to do that ?

View 2 Replies View Related

Getting Count On Weekly Basis

Apr 11, 2008

Hi All
I am using following code for my application
SELECT
convert(varchar(10),acr._eventTime,120) [Date],
sum(case r.Severity WHEN 'Warning' THEN 1 end)[Warning],
isnull(sum(case r.Severity WHEN 'OK' THEN 1 end),0)[OK],
FROM ActiveCheckIssueResult r
GROUP BY convert(varchar(10),acr._eventTime,120)


it gives me Result as,

Date warning OK
--------- --------- -----
1/1/1008 1 1
2/1/2008 0 2

i want count on weekly basis
Could any one help me?

View 8 Replies View Related

Job Agent To Schedule For Second Basis ????

Dec 4, 2006

Hello friends!

I want to set my job agent to schedule for second basis but in EM i found by right clicking job in EDIT Recuring Job Schedule i m getting option in Hr and MM but not in SS so where i can set this in seconds (SS) or through QA????


T.I.A

View 2 Replies View Related

Synchronization Performed On Day Basis

Nov 5, 2007

Currently database1 and database2 are planned to be synchronized with the interval of 5 seconds!! ( dont know exact, but i select run continoulsly on subscriber screen )
This could cause serious performance issues as both applications will be live on difference servers.

how can i Synchronization should be performed on day basis or it should be modification basis to avoid any performance issue on live application

i am using merge replication
Local distributor
and subscriber on another server .


plz help me
its urgent

View 3 Replies View Related

Breaking Query On Basis Of Conditions

Mar 20, 2008

 On a webpage, there are filters to choose from. Like date, amount, SSN (multiple filters can be choosen).I have a single query so far.   SqlCommand cmd = new SqlCommand("SELECT [column1], [column2], [column3],  [column4], [column5] FROM [table] WHERE [column4] = 'condition4'  AND [column5] = @total_bill AND [last_change] >= @txtStartDate AND [last_change] <= @txtEndDate  ", Conn) ;          cmd.Parameters.Add(new SqlParameter("@total_bill", total_bill1.Text));         cmd.Parameters.Add(new SqlParameter("@txtStartDate", txtStartDate.Text));           cmd.Parameters.Add(new SqlParameter("@txtEndDate", txtEndDate.Text));  I want to break the query so that it executes on the basis of different sets of conditions (filters). If I dont select date filter, then the above query will not execute properly.Please help. 

View 2 Replies View Related

Select On The Basis On Month And Year

May 18, 2004

hi guys.

I have a datetime column in my SQL server database.. I need to select the value from the table by passing month and year only..

any suggestions..??

Thanks in advance..

:)

View 1 Replies View Related

Capturing A Warning - Ongoing Basis

May 17, 2004

Hi all,

I currently have a series of stored procedures that capture stock prices on a daily basis, then summarize the results into a daily, and further, a weekly summary of the "index" of a group of stocks. The data is accumulated from a (to use a highly technical unit of measurement...) bunch-O-individual rows of data using aggregate functions such as AVG and SUM.

The problem is that I occasionally get a warning on such aggregate statements which is the common one complaining thusly: "Warning: Null value is eliminated by an aggregate or other SET operation"

I know where it comes from, and I know how to code to protect the aggregate from complaining (i.e., AVG(ISNULL(yadayada,0)) ) but I am interested in figuring out a way to REPORT the statement that contains null values. I can, of course, capture ERRORS in selects, but is the same mechanism used to capture these NULL warnings on my aggregate statements? I don't necessarily want to know which individual row is causing it, just want to "tag" somehow the statement that results in the warning so I can go back after the run and check into it (after capturing local "pointer" info at the time the offending aggregate is invoked).

The code I use to capture errors and trace information follows:
UPDATE PortfolioPerformance
SET PrevDate = @PrevDate,
DailyPerChg = GPP.DailyPerChg,
DailySumPriceChg = GPP.DailySumPriceChg,
SumCurrPrice = GPP.SumCurrPrice,
SumPrevPrice = GPP.SumPrevPrice,
StockCount = GPP.StockCnt,
AvgHighPriceRatio = GPP.AvgHighPriceRatio,
AvgLowPriceRatio = GPP.AvgLowPriceRatio,
Volume = GPP.Volume
FROMPortfolioPerformance PP (nolock), VIEW_Get_PortfolioPerformance GPP
WHERE PP.PortfolioID = GPP.PortfolioID AND
(PP.CreateDate = GPP.CreateDate AND
PP.CreateDate = @CreateDate) AND
PP.PrevDate IS NULL

SELECT @RowCount = LTRIM(STR(@@ROWCOUNT)) /* capture rowcount so @m_error select doesn't clobber it*/

SELECT @m_error = @@Error IF @m_error <> 0 GOTO ErrorHandler
SET @TraceMsg = 'Completed Daily Portfolio Performance calculations (updated ' + @RowCount + ' rows)'
EXECUTE [dbo].[tracelog] 1, 'Index', 'sp_Set_PortfolioPerformance', @TraceMsg

NOTE: the aggregation in the above code is performed in the view referenced as "GPP", but that's outside the realm of the question, I think, so I won't bore you with the details of that just yet.

So I think if I can capture the warning like I do the errors, I can accomplish what I want to accomplish. I haven't yet been able to find any guidance in the Books Online, so do any of you have any pointers?

Thanks!
Paul

View 2 Replies View Related

Merging 50 Databases Into One On A Nightly Basis

Sep 13, 2007

How would you solve this problem?
Would you use replication? SSIS? Schedule stored procs? A third party data tool?

We have about 50 databases located at offices around the world. There are several key tables which we need a central copy of at our Head Office.

We need only the new INSERTS or UPDATES for the day to be copied to head office.
The copying process should happen after business hours for that office.

Some cleaning of the data needs to happen before updating head office.

Our database is being installed at new offices every other month, so it's important to us that this be easy to add a new database into the schedule, ideally without needing a SQL DBA or Developer.

We want something robust, performant and easy to troubleshoot.


Kev

View 1 Replies View Related

On What Basis Sql Server Sorts The Rows

May 16, 2007

Hi,



When I execute the following statement:



Select * from table1;



On what basis, SQL server decides the sequence of these rows?



I need to fetch data from a table with very large number of rows. Because of the datasize I need to do this in chunks. I am thinking of passing row counter and fetch N rows at a time. I want to know if there is a need for sorting a table before I apply the above logic or I can rely on default sorting.



Thanks veyr much.



Regards,

Tim

View 5 Replies View Related

Monthly Report

Apr 15, 2008

Hi,

I m Maran. I am trying to write a SQL Query to retrieve the following report format. But I'm not sure how to go about it.

Input values:

Starting Date: 09/14/2007
End Date: 12/06/2007

Monthly Report :

Start Date - End Date - Number of companies
09/14/2007 - 09/30/2007 1
10/01/2007 - 10/31/2007 0
11/01/2007 - 11/30/2007 4
12/01/2007 - 12/06/2007 0

Please its very urgent, Plz do the needful help. Actually this same report format i was posted already and got some methodology, but its not satisfied my requirements :( :(

Used Table: CompanyHistorytrackTable

companyId changed_date
50198 2007-09-05 13:11:17.000
48942 2007-09-14 12:42:30.000
48945 2007-11-06 12:05:31.000
47876 2007-11-14 10:58:21.000
43278 2007-11-16 16:14:25.000
43273 2007-11-16 16:16:11.000
51695 2008-02-04 11:05:09.000
47876 2008-01-21 14:10:02.000
44604 2008-02-04 19:33:02.000
46648 2008-02-04 19:35:30.000


Manimaran.Ramaraj
Software Engineer
Aspire Systems
Chennai - 600 028

View 3 Replies View Related

SQL Server 2012 :: How To Get Data On Quarterly Basis

May 12, 2014

I need to get results on quarterly basis, matching 2 quarters AUTOMATICALLY.

- As the new quarter starts, it needs to match the last quarter results.

SELECT DATEADD(mm, (QUARTER - 1) * 3, year_date) StartDate,
DATEADD(dd, -1, DATEADD(mm, QUARTER * 3, year_date)) EndDate,
QUARTER QuarterNo

[Code] ....

Here is my Query, I don't know whether I'm getting it right?

--Quarter 1
SELECTD.MerchantName, A.MID, A.TID, ISNULL(SUM(A.SumTrxnMon), 0) AS SumTrxnMon, E.FullName, E.DxBEmail
INTO#Quarter1
FROMdbo.tblRPT_Spend AS A INNER JOIN
dbo.tblMer_DeployORetrieveTerm AS B ON A.MID = B.MID AND A.TID = B.TID INNER JOIN

[Code] ....

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved