Skip to main content
Solved

Quick report SQL help

  • January 20, 2025
  • 4 replies
  • 44 views

Forum|alt.badge.img+3

Evening i am looking for SQL help with my quick report. I’m pulling a date column in which i am truncating to split out the time. I want to create a selection box for the user to put a from and to date allowing a range to be displayed.

 

Would it be easier to pull a single selection box which the user can use the between dates function?

i’m starting with

AND TRUNC(PROMISED_DELIVERY_DATE) BETWEEN DATE '2023-06-22' AND DATE '2024-06-22'

But i need to make the user select the required dates

Best answer by Abdul

Hi ​@Fentiger79 ,

Please refer below query:

SELECT *
  FROM CUSTOMER_INFO T
 WHERE T.CREATION_DATE BETWEEN TO_DATE('&from_date', 'dd/mm/yyyy') AND
       TO_DATE('&to_date', 'dd/mm/yyyy')

System would ask user input.

 

Regards

Abdul Rehman

View original
Did this topic help you find an answer to your question?

4 replies

Marcel.Ausan
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 1142 replies
  • January 20, 2025

@Fentiger79 have you tried the sintax as per below post?

 

 


Forum|alt.badge.img+3
  • Author
  • Do Gooder (Customer)
  • 6 replies
  • January 21, 2025

no i need to give the user a selection box where they can input a date range 


Abdul
Superhero (Partner)
Forum|alt.badge.img+12
  • Superhero (Partner)
  • 241 replies
  • Answer
  • January 21, 2025

Hi ​@Fentiger79 ,

Please refer below query:

SELECT *
  FROM CUSTOMER_INFO T
 WHERE T.CREATION_DATE BETWEEN TO_DATE('&from_date', 'dd/mm/yyyy') AND
       TO_DATE('&to_date', 'dd/mm/yyyy')

System would ask user input.

 

Regards

Abdul Rehman


Forum|alt.badge.img+3
  • Author
  • Do Gooder (Customer)
  • 6 replies
  • January 21, 2025

Thank you that appears to work


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings