I want to create a Database View using Database View and Table.

YoungJae Kim
Tera Contributor

Create a 'View' using tables A and B ( A is left join true )

 

I would like to create this view again in Database View.

Can I create a view again using Table C and the created view?

 

Plase Help.

 

 

 

 

8 REPLIES 8

Brad Bowman
Kilo Patron
Kilo Patron

You cannot create a Database View using a Database View as one of the tables, but you can join table C to table A or table B to include it in the view.

   @Brad Bowman   

 

 

I want to display the 'Day' of the Request Asset Table in the Hardware Asset.

( Only data where Short Desc is Confirm )

Only one should be viewed, but two are displayed.

Is there a way?

 

Hardware ( Table C )

alm_hardware_1.png

 

 

Request Asset ( Table A )

request asset table(custom).png

 

 

Catalog Tasks( Table B )

catalog task.png

 

 

 

Database View - t3_sys_id is Short description value 'Confirm' Data

Hardware Asset is Left join false

where clause  - HardwareAsset_sys_id = RequestAsset_u_hardware_asset

                         - RequestAsset_u_catalog_task = CatalogTask_sys_id

view setting.png

 

 

View Result - It must be searched the same as the number of alm_hardware.

view result.png

I'm not sure why you have a sc_task sys_id hard-coded in the where clause, but if this is working for you otherwise, then you should be able to add to the Where clause on 300

&&t3_short_description='Confirm'

 

@Brad Bowman  

 

When use Clause 

&&t3_short_description='Confirm'
there will be 2 views. Two are being searched for one Display Name.

 

Where clause

t2_u_catalog_task=t3_sys_id && t3_short_description='Confirm'

t2.png

 

 

Where clause

t2_u_catalog_task=t3_sys_id

t1.png

 

I want to create view
join t2 and t3 first
After Search only the 'confirm' data from Request Asset.

And This is searched by left joining with t1(Hardware).

( After joining the two tables and querying them first,
with that data Left join must be performed. )

------------------------------------------------

SELET * FROM Hardwarwe T1
LEFT JOIN (
SELECT * FROM
Request T2, Catalog T3
Where T2.Catalog_task = T3.SYS_ID
and T3.Short_description='Confirm'
) T4
ON T1.SYS_ID = T4.HARDWARE_ASSET

------------------------------------------------

 

However, I cannot implement the function I want while using three tables at the same time.

Is there a way?

ddd.png

 

Plase Help