Requierement to be implemented in ORACLE

  • We have two tables as given below :

    table

    c1 c2 c3 c4[/b]

    A1 b1 x x

    A2 b2 x x

    A3 b3 x x

    A4 b4 x x

    A5 b5 x x

    A6 b1 x x

    A7 b2 x x

    A8 b4 x x

    A9 b6 x x

    " " " "

    " " " "

    An ..................... x

    TABLE B

    c1 c2 c3

    b1 x1 x

    b2 x2 x

    b3 x3 x

    b4 x4 x

    b5 x5 x

    b6 x6 x

    " x7 x

    " x8 x

    bn x9 x

    Where n in table B is any unknown number which can increase as the table gets new rows. Similarly size of table A changes dynamically.

    I need a report to be created using both the tables in the below format :

    REPORT

    x1 x2 x3 x4 x5 x6 .....................

    A1 1 1 1 1 0 0

    A2 1 0 0 0 1 0

    A3 0 0 0 1 0 1

    Here all distinct values of A.c1 will become row header and distinct values of B.c2 should become column header.

    The check being done here for generating the report is that for every An iN TABLE A IF xn belongs to it value is 1 else 0.

    NOTE : (xn is just a display value in report which is like an alias for B.c1 or A.c2 and can be mapped using B.c1 and A.c2)

    Please suggest how we can implement this.

    Thanks

  • This is SQL Server Forum. For your requirements we might come with some solution but its applicability to Oracle is doubtful.

    Please post your question in Oracle forum.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply