another countif issue (1 Viewer)

yahoo

Registered User.
Local time
Today, 08:03
Joined
Jan 10, 2013
Messages
13
Hi there

See below part of my query result. I would like to display the count of custom concatenated fields 'concat2' as another field.
So the new field would be 2 for every row. I tried various ways but no luck so far...


| Operation | concat2
| 10 | RUATAC14 50000038 |
| 20 | RUATAC14 50000038 |
| 20 | RUATDP34 50000008 |
| 20 | RUATDP34 50000039 |
| 10 | RUATDP34 50000008 |
| 10 | RUATDP34 50000039 |
| 10 | RUCMTM14 50000275 |
| 20 | RUCMTM14 50000275 |
 

MarkK

bit cruncher
Local time
Today, 00:03
Joined
Mar 17, 2004
Messages
8,181
Did you try a sub-query? Write a whole other query that returns that value for the field you need.
Code:
SELECT Field1, Field2, ( SELECT TOP 1 Field1 FROM Table2 ) As Field3
FROM Table1
See how the value of Field3 is provided by a completely new query? That query can go do the count you need.
 

Users who are viewing this thread

Top Bottom