View Full Version : Create View that contains flow direction info.
qmlm1981
05-30-2006, 05:38 AM
I want to create a view ,and I want to contain flow direction information in it.For example,a pipe line named L1000,it is from pump P-001 to tank Tk-001.My view should be like following figure.How to finish that ?Could anyone send me the SQL code?
http://www.plantsoft.com/download/shipeng/Image00000.jpg
What we have done in this case is to create two new fields in the PROCESS table (projdata > PROCESS) called "TO_EXISTING" and "FROM_EXISTING". We then fill these fields out manually. Doing it this way gives us control over what we want to say in our TO/FROM on our reports. All the other fields in your graphic are already in the table.
Here is what the SQL code to what you have in your graphic.
SELECT TAG_REG.TAG_NO, PROCESS.PSERV, PROCESS.PROCESS_FROM, PROCESS.PROCESS_TO, PROCESS.PSZ_NOM, PROCESS.POPP_NOM
FROM (((((TAG_REG RIGHT JOIN ((NOZZLE RIGHT JOIN PIPE_RUN ON NOZZLE.NLINE = PIPE_RUN.KEYTAG) RIGHT JOIN PROCESS ON PIPE_RUN.LINE_ID = PROCESS.KEYTAG) ON TAG_REG.KEYTAG = PROCESS.KEYTAG) LEFT JOIN EQUIP ON NOZZLE.NEQUIP = EQUIP.KEYTAG) LEFT JOIN TAG_REG AS TAG_REG_1 ON NOZZLE.NEQUIP = TAG_REG_1.KEYTAG) LEFT JOIN KEY_LINK ON PROCESS.KEYTAG = KEY_LINK.KEYTAG) LEFT JOIN PROC_LNK ON KEY_LINK.LINK_ID = PROC_LNK.LINK_ID) LEFT JOIN DOC_REG ON PROC_LNK.DWG_NAME = DOC_REG.DOC_ID
WHERE (((TAG_REG.TAG_NO) Is Not Null))
ORDER BY TAG_REG.TAG_NO;
qmlm1981
05-31-2006, 08:40 AM
Can I make it with existing fields ?I don't not want to enter the informaiton manually.
Thanks.
You mean enter information in the TO/From fields?
qmlm1981
05-31-2006, 06:22 PM
No,I want to create the view with the exsiting atrribute of the pipe run.The pipe runs on the P&ID ,they have the flow direction attribute.But,I cannot find the locaiton of the data.
We are working on that as well. For the time being we manually fill out all of our TO/FROM fields.
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.