COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: srinu_anu2007 on 20 Sep 2012 01:28:49 AM

Title: Union in Prompt query
Post by: srinu_anu2007 on 20 Sep 2012 01:28:49 AM
Hi,

I have prompt name and its having two columns which is patient member id and subscriber member id, sub ln,sub fn,pat ln and pat,fn.

If a user chooses to search with the Subscriber/member Name, they can input any part (First or Last Name) of the Member/Subscriber they wish to search for. The report should search all respective Member Name fields listed below to match each part of the Provider Name that was given by the user. The order in which the report searches for the field does not matter.  UNION ALL
this is my requirement and i want do use in

Use property [pat.memid] or [sub.memid]
display :[sub.ln] +', '+ [sub.fn] or [pat.ln] +',' [pat.fn]

can any one suggest on the same.

Thanks,
Title: Re: Union in Prompt query
Post by: wyconian on 21 Sep 2012 03:05:29 AM
Hi

I think the prompt can only be based on a single query.  To get to that you can have a union query that has two sub queries, one for pat.memid, the other for sub.mendid.  So you end up with a query that has all memids in it.  You can use that as the query for the prompt.

When you use the prompt value in the report query you will probably need to have a filter something like sub.memid like '%prompt%' or pat.memid like '%prompt%' .  You may also want to put an upper around the value the users select and the prompt values so you can deal with how ever the user enters text.

Good luck :-)