Hi
I wanted to delete a document from CMOD that has around 30 fields.
I have the load ID and I can use load ID plus one of the 30 fields to uniquely identify the document using 'arsdoc query' with -x parameter.
Unfortunately, the arsdoc delete doesnot have -x option which means I have to pass all 30 fields to make sure only one record is deleted.
This is really frustrating.
Does anyone have any suggestions?
Thanks
Pankaj.
You should be able to use the -i option and use an SQL statement to identify your document to be deleted.
Let us know how it works out!
-JD.
Yes -i would work.
But I wanted to avoid constructing a query with -i parameter since i will have to add 30 fields to uniquely identify a document.
If I had a -x option, i would have to just pass the load ID and one of the 30 fields.
But looks like I will have to live with the -i parameter.
Pankaj,
If I understand Justin correctly, he meant something like this in your -i, rather than having all 30 fields
[-i "WHERE doc_name = '3762FAA' and pri_nid=132 and sec_nid=0"]
Hope this works for you.
-jw
Yes - the -i option allows you to do free-form SQL select statements. JW's example was correct. You can use any field you've defined in the AG, as well as CMOD's internal fields like DOC_NAME and DOC_OFFSET.
I would use something like "where CUST_NUM=12345 and ZIP_CODE=90210".
Just remember to be careful and test your queries. You could cause a lot of damage with a typo.
-JD.
pri_ind, sec_ind and doc_name - Are these CMOD defined columns?
Pankaj,
Yes, they are. But, you can use them in the -i clause.
By the way, it is pri_nid and sec_nid, not pri_ind and sec_nid
-jw