Question
Cognizant Technology Solutions
IN
Last activity: 26 Jul 2017 7:47 EDT
How to pass parameter value in connect sql for inserting or selecting the data
Hi,
How to pass parameter values in connect sql query for inserting,updating and selecting the data.
Thanks.
***Edited by moderator, Maryrita: moved to Product Support from Applications***
***Moderator Edit: Vidyaranjan | Updated Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
BUPA
AU
You can't pass parameter to Connect-SQL rule. You have to set it on a page and execute the Connect-SQL using that page as a step page. Either you can use below syntax to refer the property.
{ASIS: myPage.myProperty}
{myPage.myPropert}
{.myProperty}
{ASIS: .myProperty}
-
Madhusudhana Vemula Ashok Rao Vijekanth Moorthy
Accenture Australia
AU
Hi Sorentara,
Adding lines to swarnendu, you can use the pega py properties and set the param values which you want to pass to SQL. By using the property set on the page which the SQL executing. You can also use the DSS to pass the values to parameters at the run time.
Thanks
-
Madhusudhana Vemula
LTIMindtree
IN
Hi Dileep,
I want to use DSS to pass values to parameters at run time.
My requirement is- i want to give some values as DSS and then use that DSS in activity, and the values passed in DSS i want to give in where clause in Connect-SQL.
-
Preethi Ageer
Cognizant Technology Solutions
IN
Hi All,
I set the value in a property using property-set method on a page(mentioned in step page) and passed that page to Connect-SQL and in connect-sql below queries are executed.
For Saving the data:
eg: Insert into {Class:ClassName}(ID,NAME)values('{ASIS:mypage.ID}','{ASIS:mypage.Name}')
For Browing the data :
eg: Select ID,NAME,from {Class:ClassName} where ID='{ASIS: .id}'
here ID and NAME are DB column name whereas mypage is page name and ID and Name are property name where values are being passed in activity
-
Preethi Ageer Vijekanth Moorthy
Accenture Australia
AU
Hi Sorentara,
What exactly you need from the above reply. Please elaborate it.
Thanks
Cognizant Technology Solutions
IN
Hi,
I wanted to fetch and save the date into external table using connects-sql .
Accenture Australia
AU
Hi Sorentara,
By using the DSS you can pass the value at run time.For that before calling the RDB-List method in activity keep a property set and set the DSS value to the properties on the page which you are using to execute the SQL like pycity,pyDescription,pycount etc..Then in the connect sql if you want to fetch the data by using these properties you can give like this.
Select * from {class:class name} where property you want to get = {ASIS:.pycity} by this you can pass the value to the property at the run time.
For saving the property in external data base you have use the save query method like RDB -SAVE. In the activity you can assign the value to any of the property and it can be used in the save query like
Update {class:classname} where property you want to save = {ASIS:.pydescription}
Thanks
-
Mrudula Adapa