HELP With DataView Where Search Criteria
Hi All.
I'm using ReportBuilder 9.01. I've got a DataView created for my report
using the "Data" tab in the RBuilder IDE.
How do I add a search criteria to the WHERE clause of my SQL to compare
two fields in the same result set?
In other words how can I do this in the WHERE clause
SELECT FIELD1, FIELD2
FROM SOME_TABLE
WHERE FIELD1 <> FIELD2
It seems that ReportBuilder only allows literal values to be specified
on the right-hand side of the comparison.
Please help.
Regards,
Paul
I'm using ReportBuilder 9.01. I've got a DataView created for my report
using the "Data" tab in the RBuilder IDE.
How do I add a search criteria to the WHERE clause of my SQL to compare
two fields in the same result set?
In other words how can I do this in the WHERE clause
SELECT FIELD1, FIELD2
FROM SOME_TABLE
WHERE FIELD1 <> FIELD2
It seems that ReportBuilder only allows literal values to be specified
on the right-hand side of the comparison.
Please help.
Regards,
Paul
This discussion has been closed.
Comments
It is possible to manually enter in the field name into the Value edit box
of the search tab in the Query Designer. For instance, if searched on
Orders.AmountPaid and entered Orders.ItemsTotal into the Value edit box with
an "equals" comparison, the resulting SQL could look like the following...
SELECT Orders.CustNo, Orders.OrderNo
FROM Orders
WHERE (Orders.AmountPaid = Orders.ItemsTotal)
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks for the info. I had no idea that was legal.
Regards,
Paul