Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8545

Re: Workaround for query generated by BO 4.0

$
0
0

Hi,

 

Thank you for your suggestions. I am currently running into a weird issue when trying the solution with two queries in Web Intelligence.

 

I have my first query coming from the derived table "CUSTOM_DATE" which looks like this:

 

SELECT

CAST(CONVERT(VARCHAR(30), GETDATE(), 112) AS INT) AS DATE_ID,

CONVERT(DATE, GetDate(), 111) AS CURR_DATE,

CONVERT(DATE,dateadd(qq, DATEDIFF(qq,0,GETDATE())-5,0),103) AS FIRSTDAYOFPREV5QTR,

CONVERT(DATE,dateadd(qq, DATEDIFF(qq,0,GETDATE()),0),103)  AS FIRSTDAYOFCURRQTR

 

When I create a new report on my first query, the dates are correct in the report block.

 

I am using FIRSTDAYOFPREV5QTR, FIRSTDAYOFCURRQTR values in 2nd Query to filter records to fetch results only for previous 5 quarters.

 

        DIM_DATE >= FIRSTDAYOFPREV5QTR

AND

        DIM_DATE < FIRSTDAYOFCURRQTR

 

However, currently the second query fetching the data in "dd/mm/yyyy" format wherein I am anticipating result for "mm/dd/yyyy" format.

 

This is because, currently, whenever a end user is entering some value for a date prompt, BO is showing it (display prompt text, also using calendar button) in dd/mm/yyyy format and in query it (show SQL) is reading as mm/dd/yyyy format. But my parameter values which I am passing from another query come into my report as dd/mm/yyyy format and remain in dd/mm/yyyy format when used in second query.

 

To me, it looks like when data is passed from one query to other, BO is reading it as some static text ? How do I control/handle this data prompt issue when passing between two queries?

 

I thought this is simple settings issue, but this is eating my time. Please help !!

 

Regards,

Raj


Viewing all articles
Browse latest Browse all 8545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>