Adapter service with dynamic Table Name

WM6.0.1
OS - LINUX

Is there a possibility to create a generic Adapter Custom/Select Service, where Table Name will be specified at RunTime.

Thanks
Manisha

Manisha,

You can make the entire sql dynamic, not just the table. Use the DynamicSQL template to create an adapter service and define the variable part of your query by using {varName}. This varName becomes an input to the service whose value is to be provided at run time to construct the complete sql. So let’s say in your service you define your SQL as:

SELECT president FROM usa WHERE ${criteria}

the criteria will become the input to your service. When you execute your adapter service you will be asked to provide a value for criteria. Let’s say you assign it the value electedYear=2004, your complete sql will be: SELECT president FROM usa WHERE electedYear=2004.

PS: No semicolon is required to terminate the sql.
HTH, Rohit