I am trying to count the number of 'G's in 3 columns for 2 rows.
The top script is one of the 3 which is causing a problem. Count(RGB_STSOnly) returns a 1. In double checking I ran the bottom script and there is nothing showing but an empty box in the "Results to Grid".
The RGB_STSOnly column does have a 'B' in row 2, but I need to count the number of 'G''s in the column for rows 1 and 2 and get a total.
Obviously counting a 1 for that is invalid if I am looking for 'G's. Can someone help me figure out what to look for to make it 0 if there are no G's ?
I have another one which returns a Null since there are no G's or B' and its count is zero so not sure what's going on with this script?
See attachment
TIA
DougP
The top script is one of the 3 which is causing a problem. Count(RGB_STSOnly) returns a 1. In double checking I ran the bottom script and there is nothing showing but an empty box in the "Results to Grid".
The RGB_STSOnly column does have a 'B' in row 2, but I need to count the number of 'G''s in the column for rows 1 and 2 and get a total.
Obviously counting a 1 for that is invalid if I am looking for 'G's. Can someone help me figure out what to look for to make it 0 if there are no G's ?
I have another one which returns a Null since there are no G's or B' and its count is zero so not sure what's going on with this script?
See attachment
TIA
Code:
Select Count(RGB_STSOnly) as Count_RGB_STSOnly
from histdata Where
RecordID Between 1
AND 2
AND RGB_TckrPercent = 'G'
----
Select RGB_STSOnly
from histdata Where
RecordID Between 1
AND 2
AND RGB_TckrPercent = 'G'
DougP