Hi
I am writing an IF statement to extract max and min of the water depth from the monitoring record table.The monitoring table have some other gas monitoring related data however I am interested in filtering it by WDEP (water related monitoring) type record. I have written following line in the "depth expression" of discrete graphics Vs depth item.
<<IIf(_ (<<MOND.MOND_TYPE>>= "WDEP"),<<Min(<<MOND.MOND_RDNG>>)>>_ )>>
I have similar expression for maximum water in another discrete graphics Vs depth item.
Please can you guide me what is problem with above statement or this is not correct way to achieve my objective?
Thanks
This can be easily done using SQL,
<<Sql(_ SELECT MIN ([MOND].[MOND_RDNG]) _ From [MOND] _ Where [MOND].[PointID] = '<<PointID>>' _ AND [MOND].[MOND_TYPE] = "WDEP" _)>>
Do the same by replacing MIN with MAX.
Answer Verified By: Javied Iqbal
Can you please see if following sql statement is correct :
For top of response zone in "vertical line to depth " :
<<Sql(_ SELECT [MONG].[MONG_TRZ] _ From [MONG] _ Where [MONG].[PointID] = '<<PointID>>' _ AND ( [MONG].[PIPE_REF] = "01" _ OR [MONG].[PIPE_REF] = "MP1" _ OR [MONG].[PIPE_REF] = "Pipe 1" _ OR [MONG].[PIPE_REF] = "" _ OR [MONG].[PIPE_REF] = "-" ) _ )>>
and for bottom of the response zone is just replacing TRZ with BRZ.
When I run above statement in fence output diagram my line goes from top to bottom !
Thanks,
Jav
Try the following;
<<Sql( _ SELECT MIN ([MONG].[MONG_TRZ]) _ From [MONG] _ Where [MONG].[PointID] = '<<PointID>>' _ AND [MONG].[PIPE_REF] IN ("01", "MP1", "Pipe 1", "", "-") _ )>>
Hi This doest not appear to be working for vertical line with depth.what can be reason.thanks
Did you use "SELECT MIN" for top depth and "SELECT MAX" for bottom depth?Also, put these commands in a text entity and see the value it's printing. If you couldn't figure it out, send me the project and library file, I'll see what I can do.
There are several problems i"m noticing when I do an example.
1) Plase put a brackets for the following line;
SELECT MIN ([MONG].[MONG_TRZ]) _
2) Do you have <<POINT.POINTID>> field in your project? If not, use the following:
<<Sql( _ SELECT MIN ([MONG].[MONG_TRZ]) _ From [MONG] _ Where [MONG].[PIPE_REF] IN ("01", "MP1", "Pipe 1", "", "-") _ )>>
3) While using "SELECT MIN", having a null value ("") in the list will result an error. To overcome this use a negative argument as you have only two sets of data.
<<Sql( _ SELECT MIN ([MONG].[MONG_TRZ]) _ From [MONG] _ Where [MONG].[PointID] = '<<PointID>>' _ AND [MONG].[PIPE_REF] NOT IN ("02", "MP2", "Pipe 2") _ )>>