Showing posts with label retrieving. Show all posts
Showing posts with label retrieving. Show all posts

Tuesday, March 20, 2012

Calculate Quarter

Hi,

I need to retrieve both Mont and Quarter from an MS SQL server field containing a date as ''01/01/2007 12:10:00'.

Retrieving the Month is working properly, but getting some sql error with the Quarter function.

I will appreciate if someone can indicate me how should I do in order to retrieve the Quarter from a date.

To retrieve the month, I am using:

& "MONTH(STOCK.VALUEDATE) AS 'Month'"

To retrieve the Quarter, I am trying (but getting error):

& "QUARTER(STOCK.VALUEDATE) AS Quarter"
Thanks,

Aldo.

I already got the answer...

& "STOCK.VALUEDATE AS 'Original Date', " _
& "DATEPART(month, STOCK.VALUEDATE) AS 'Month', " _
& "DATEPART(quarter, STOCK.VALUEDATE) AS 'Quarter', " _
& "DATEPART(year, STOCK.VALUEDATE) AS 'Year', " _
Thanks anyway,

Aldo.

|||Aldo,
Please use the Transact-SQL forum for these kinds of questions. This has nothing to do with SSIS.

Thanks,
Phil

Thursday, March 8, 2012

Caching problem

Hi,
I'm retrieving data from on Oracle database. Even though caching for this
report is disabled, i still get the same data. If i run the report in VS and
preview it, there seems no prblem..
Anyone an idea?if you are calling the report via URL access then add the rs:ClearSession
parameter to the url....
"Koen" wrote:
> Hi,
> I'm retrieving data from on Oracle database. Even though caching for this
> report is disabled, i still get the same data. If i run the report in VS and
> preview it, there seems no prblem..
> Anyone an idea?|||is there a way to set that at the report level?
"NH" wrote:
> if you are calling the report via URL access then add the rs:ClearSession
> parameter to the url....
> "Koen" wrote:
> > Hi,
> >
> > I'm retrieving data from on Oracle database. Even though caching for this
> > report is disabled, i still get the same data. If i run the report in VS and
> > preview it, there seems no prblem..
> >
> > Anyone an idea?|||I dont know of a way but it shouldnt really matter as long as you specify it
in the url.
"Marvin" wrote:
> is there a way to set that at the report level?
> "NH" wrote:
> > if you are calling the report via URL access then add the rs:ClearSession
> > parameter to the url....
> >
> > "Koen" wrote:
> >
> > > Hi,
> > >
> > > I'm retrieving data from on Oracle database. Even though caching for this
> > > report is disabled, i still get the same data. If i run the report in VS and
> > > preview it, there seems no prblem..
> > >
> > > Anyone an idea?