Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to have the inputs for StartDate and EndDate in SQL?
tanthiamhuat
I have Report Parameters (StartDate and EndDate), and I want these 2 inputs inside the SQL. I tried below, but does not work.select SYSTEMTYPE_ABC, TIME_STEP, TIME_SYSTEM, LASTUPDATEfrom table_XYZwhere (SYSTEMTYPE_ABC like ?) and (LASTUPDATE BETWEEN like ? AND like ?)What the correct syntax?thanks.
Find more posts tagged with
Comments
kclark
<p>After writing that sql statement did you link the parameters in the parameter tab of the query builder UI?</p>
tanthiamhuat
<p>yes, there are 3 input parameters linked, as seen in the printscreens.</p><p> </p><p>would you able to join.me, so that I can share the screen to show you?</p>
Hans_vd
<p>Hi Tanthiamhuat,</p><p> </p><p>You need to remove the "like" keywords when comparing to dates.</p><p>So change</p><pre class="_prettyXprint">and (LASTUPDATE BETWEEN like ? AND like ?)</pre><p>[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]into[/color]</p><pre class="_prettyXprint">and (LASTUPDATE BETWEEN ? AND ?)</pre><p>Hope it helps</p><p>Hans</p>