0

I have a PS Query and one of its prompts is ADM_CREATION_DT where the condition is:

This is a FROM date. All records starting from the selected date to the current date will be included in the report. Leaving this blank will default this to the current date.

I'm quite lost how to put this in the criteria.

part where Invalid datatype error happens enter image description here

Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
Link
  • 171
  • 2
  • 19

1 Answers1

0

I think you can make a decode expression and make the date sysdate if the prompt value is empty.

decode(:1,NULL,sysdate,:1)

here are some search results for: ps query decode prompt sysdate

Looking at the search results above, you may need to do a TO_CHAR on the date field. If so, I would look at other dates in the SELECT clause of the SQL generated by PS Query and use the same format they do.

qyb2zm302
  • 6,458
  • 2
  • 17
  • 17
  • I cant make this to work man, I still get Invalid datatype error. – Link May 10 '18 at 02:56
  • Please post your sql snippet. You can use http://sqlfiddle.com OR https://pastebin.com OR just add some lines to the bottom of you comment as an "edit" and put the code that's failing below that. – qyb2zm302 May 10 '18 at 04:19