Hi All,
I have created one query for accessing the folders created into a project:
Select object_name From als_folder where folder('/folder1',descend);
Now I want variable in place of folder1.
Please any one help me?
GyanSingh
When you say you need a variable - what do you mean?
Do you have to run the same query for multiple values of folder1 ?
Please explain your scenario
Kind Regards,
Ashish Srivastava
Hello Ashish,
Yes, I have to run the same query for multiple values of folder1.
I have one template to generate reports and in that I need a general query with folder1 as variable.
Thanks & Regards,
Gyan Singh
Gyan,
I think what I understood is you have few java classes and you are trying to create DQL template so that same query can be used multiple times by passing different values
If that is the case , take a look at last two sections of https://code.google.com/p/dctm-commons/wiki/Using
There are various ways of DQL templating , if you can share your code base _ can take a look and try for this query
Please note - you can pass folder/cabinet Id also in place of folder1 in your query
Let me know if it helped in any way
Hi Ashish,
I have to write this query for dqMan. And I want folder1 as variable but I am not able to make it variable in dqMan.
Hi Gyan,
please try the following query for dqMan. The tool asks for the variable each time you execute it. In addition you can add the query to your favorites.
select object_name from als_folder where folder('/{var1}', descend);
Regards,
Christian
Will try Gyan in dqman and let you know
Below query works in dqman
select * from custom_folder_type where folder('{var1}', descend);
It gives a prompt where I put the folder path like /cabinetName/folderName
If this is what you are looking for, you can use it this way
The query that Christian provided will also work but you need to provide the folder path as cabinetName/folderName (without initial /)
I was also able to add a query template in dqman with below query
Select r_object_id,object_name,acl_name,r_folder_path from dm_folder where folder('{*}',DESCEND) order by object_name;
or with
select * from dm_folder where folder('{*}', descend);
You can go to Documentation -> Add Documentation and add your query template in Cabinets/Folder under Repository Navigator under DQL Comman View
I think this is what you are looking for
Please mark the post as Helpful or Correct if it is
Thanks to both of you. It is fine for me.