If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

question regarding filtering !!!basic sql~~~

Started by katdbc, 28 Sep 2010 10:52:42 PM

Previous topic - Next topic

katdbc

i have a doubt in report studio !!!!

i have a column called account_num  its values start with tc !!!
i want to remove the tc and want the account number which starts with 500
how do i do it easily!!!
i first used a substring and then again used a substring(substring(),,,,)=500

i donno whats rong!!!can u guys correct me here on what will work on report studio!!!!

my answer is substr(substr([account_num],3,10),1,3)=500


technomorph

If I've interpreted what you want correctly....

Create a column ([My_Data_Item]) with the following:
substr([account_num],3,10)

Create a filter:
substr([My_Data_Item],1,3) = 500



Gopinath

I hope the simplest way is creating a filter like
substr([account_num],3,3) = '500'

katdbc

Thank you for your replies!!!!!!!
it did work!!!!!

is anything wrong with the report studio,some times a query doesn work and if i open the same query next day,it runs fine!!!!!
what would be the best suggestion from ur experince!!i have just started with the report studio!!!!!so plz bare my questions!!!!!!

cognostechie

From my experience, I have noticed that Report Studio is moody. The queries particularly run fine during the 1st part of the day and it starts acting up after 3 pm or so. The dispatchers become tired from continuous calls being made to them since early morning. Like all of us, it also needs a rest of 8 hrs during the night. That might be the reason why your query worked the next day !

Seriously..sometimes WE become tired and can't figure out what's wrong and the next day, our minds work better !