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 get all the query result if there is more than one record?
jjin
Hi,
I have the query like this:
select a.orgname, a.tndrnum, a.quotetype,a.orgId,
a.openclose, a.closeddate, a.createdby,
a.seqformat, b.firstname, b.lastname, b.title,
c.meetingdate
from sttender a
left join scuser b
on a.createdBy = b.userid
left join sttendersitemeeting c
on a.sysId = c.sysId and a.orgId = c.orgId and a.tndrId = c.tndrId
where a.sysId = ?
and a.orgId = ?
and a.tndrId = ?
I need to show all the meetingdate in one unit.
And I try to get the meetingdate like this:
row["MEETINGDATE"];
I can see there is 2 records for this query through Edit Data Set - Preview Results.
But I only get one record for row["MEETINGDATE"].
How can I get all records?
Thanks,
Jason
Find more posts tagged with
Comments
kclark
What type of object are you placing row["MEETINGDATE"] into? If it's in a grid or single data element then it won't iterate. You would need to put it into a table or list. If you do want to display all of the results for MEETINGDATE in a table you could create a computed column and use concatenate then use the computed column as the data and everything will be displayed.
jjin
Thank you
I will put row["MEETINGDATE"] in a table.
Could you please let me know how to iterate the result? I have to get the 2 value for row["MEETINGDATE"], because there is 2 records for the query
Thanks lot
Jason
kclark
If you place that in a table or list it will do that for you.
jjin
I have to show the values of 2 records together.
For example, something like row["MEETINGDATE"].firstrecord + row["MEETINGDATE"].secondrecord.
So I have to iterate the resultSet manully.
If I put row["MEETINGDATE"] to table, and do nothing else, it will display the value of first record in one row, and display the value of second record in the second row of the table. That is not what I need.
Do you have sulotion for this situation?
Thanks lot
Jason
kclark
Create a computed column, set the aggregation to concatenate, the expression will be row["MEETINGDATE"] set the type to string. You can then drag the computed column to your report layout and it should show the results you'd like.
jjin
Hi kclark,
I created the computed column, place it in table, and get the result like following:
Bid #:
Closing Date:
Site Meeting: 2012-10-30 7:00:00 AM ET Mandatory
Bid #:
Closing Date:
Site Meeting: 2012-10-23 11:00:00 AM ET Recommended
But actually, I only want to display one Bid #:, one Closing Date:, one Site Meeting:. In the Site Meeting:,
I have to show "2012-10-30 7:00:00 AM ET Mandatory" and "2012-10-23 11:00:00 AM ET Recommended".
Do you have any sulotion for this?
Thank you so much
Jason
jjin
I try to use XMLAgg in the query, but it return nothing in the Preview Result. The same query return the value(XML string) in the Oracle Developer. Anybody use XMLAgg in the birt?
Thanks,
Jason
kclark
What does your data look like in the preview results?
jjin
If I use XMLAgg, it has only one record. That's good. But the data field which use XMLAgg is empty. The data filed return correct value in Oracle developer.
If I don't use XMLAgg, then it has 2 records. The problem is I have to display the two records in one row of table or grid.
Thanks,
Jason