About RAP and parameters
Hello Folks,
I'm testing the usage of parameters with direct sql in enduser reports.
In my test I'm using
select * from customers where code >= :param1 and code <= :param2
this works correctly.
But one question.
I want to use between params.
Is there anything to do something like this:
1st. Create a between param
2nd. In the query editor write sql code like this:
select * from customers where code between :param1.value1 and
:param1.value2
Regards,
Francis
I'm testing the usage of parameters with direct sql in enduser reports.
In my test I'm using
select * from customers where code >= :param1 and code <= :param2
this works correctly.
But one question.
I want to use between params.
Is there anything to do something like this:
1st. Create a between param
2nd. In the query editor write sql code like this:
select * from customers where code between :param1.value1 and
:param1.value2
Regards,
Francis
This discussion has been closed.
Comments
When using between parameters you can use two parameters like you have below
or you can use a single autosearch parameter with a search expression
separated by a comma (defining each value). Then you can access each value
using the TppParameter.Values[] property.
select * from customers where code between :param1.values[0] and
:param1.values[1]
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I can't find documentation about this, I'm coming from Version 7 where there
isn't parameters which I think is a very good feature.
Are you meaning that if I have a parameter called 'timeperiod' like this
datatype dtDateTime
enabled true
SearchExpression 1/1/2009-2/1/2009
SearchOperator soBetween
Then I can go to the SQLEditor and write
Select * from bookings
where bookings.bookingdate between :timeperiod.values[0] and
:timeperiod.values[1]
In the perfect world, this could be fantastic.
Regards
Francis
If you are editing the SQL in DADE, there is no need to define each value.
DADE will construct the expression itself based on how many values are
present in the parameter.
Select * from bookings
where bookings.bookingdate between :timeperiod
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com