I have a question regarding Query Database Smart Service

Hi All,

I have a question regarding Query Database Smart Service. I ran a sql query by the following: SELECT ID, APP_TYPE, PHONE_NUM, FIRST_NAME, LAST_NAME, SUFFIX, DOB, STATE, ZIP_CODE, SSN FROM SWAT2_APP WHERE FIRST_NAME LIKE ac!FIRST_NAME AND LAST_NAME LIKE ac!LAST_NAME

and in the outputs tab I see the outputs as mulitple indicated by the blue cascading boxes. I can't save this into a CDT pv. Since this is a multipel it's asking me to save into a CDT that lies inside another CDT. Dont' know why this is happening. I have attached screenshot. Can anybody suggest any solutions?...

OriginalPostID-131461

OriginalPostID-131461

  Discussion posts and replies are publicly visible

  • Since the query can potentially return multiple results, Appian treats the output as such. You should be able to leave the Results outputs blank, but create Custom Outputs to save the ac! data into the correct variables/CDTs. Additionally, if you are only allowing for one result you may want to include "Select Top 1 ID, .." (SQL) or "where rownum=1" (Oracle) in your query to prevent possible process errors down the road.