Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ApplyComparison help

Status
Not open for further replies.

jonhoward

IS-IT--Management
Apr 9, 2003
41
0
0
EU
Report is supposed to allow the user to choose a period, then present data for any subsequent periods in the warehouse. For example, if the user chooses October 2002, the end results should show data for November 2002, December 2002, January 2003 etc etc etc.

==============

SQL being generated is wrong - get a "SQL command not properly ended"

==============

Filter defined as:
ApplyComparison ("#0 > #1", [Posting Period]@ID, ?PromptName). This is validated as OK by MSTR.

"PromptName" is defined as an Elements Prompt with list all elements (no restriction) on attribute Period. Period is defined from LOOKUP_TABLE.PERIOD

===============

MSTR generates the following ... (let's say the user chooses "October 2002")

select blah blah blah
where LOOKUP_TABLE.PERIOD > LOOKUP_TABLE.PERIOD in ('(2002-10)')
group by blah blah blah

================

The correct SQL would look like this...
where LOOKUP_TABLE.PERIOD > ('(2002-10)')

================

Any ideas what I'm doing wrong?
 
Try replacing your elements prompt with a date value prompt. SQL generated by prompts differ based on the prompt type. See technote TN5200-7X0-0100.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top