can I use where exists to fetch a document which has a deptn (say d1) and subdeptn (say sd1) and which is active (“Y”)?
I’ve recently migrated to Couch from Oracle and I find this a bit intimidating.
My document is as follows:
{
"docType": "transCodes",
"cds":
[
{
"deptn": 73,
"subTrans":
[
{
"subDept": 1,
"active": "Y",
"prmpts":
[
{
"inclSubDept": 99,
"inclDept": 96
}
]
}
]
}
]
}
really appreciate your help