nolita Posted November 3, 2006 Share Posted November 3, 2006 hi, I have a problem and no idea how to solve this problem: I have a table A, in this table there is for example a field ID in it, which refers on a field ID_firma in table B. Now I don't want to give back the ID in the field, but the name of the firma from this ID.. any ideas how to manage this? Table AID: 1 Table BID: 1Firma: Oleg AG Result should be:in table: A Oleg AG ... Please help me! Link to comment Share on other sites More sharing options...
dpinfo Posted November 4, 2006 Share Posted November 4, 2006 I think that a query might be the solution of your problem.The query might be like this: select a.field, b.firma AS FIRMA from a,bwherea.id=b.id In IReport you could show only $F{FIRMA} and not the key (a.id). If you prefer you could create a view that shows all the field you need of table a and b.The sintax is create or replace view xxx as(select a.field1 field1,a.field2, a.field3,b.firmafrom a, bwhere a.id=b.id) and then you make all the queries on this view. I hope that this help Byedpinfo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now