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

creating the data items by using sql queries

Started by karthik12345, 11 Apr 2016 05:06:16 AM

Previous topic - Next topic

karthik12345

Hi all,
   
    How can i create the data items in report studio by using sql queries.
   i.e data item1 -> select emp-name from emp  where emploc='us' and empsal<10000
   i want emp-name have to meet the above criteria, how can i achieve this.

Thanks,
Karthee
 

BigChris

That just looks like a simple filter - you're likely to need something like:

[EmpLoc] = 'us' and [EmpSal] < 10000

karthik12345

Thanks Chris,
 
      But i have the show in other data item 2-> data item1 -> select emp-name from emp  where emploc='AUS' and empsal<10000

Thanks,
karthee

MFGF

Quote from: karthik12345 on 11 Apr 2016 06:02:44 AM
Thanks Chris,
 
      But i have the show in other data item 2-> data item1 -> select emp-name from emp  where emploc='AUS' and empsal<10000

Thanks,
karthee

Why are you trying to create a report populated by hand-coded SQL rather than based on a package?

MF.
Meep!

karthik12345

 
   Just i am trying to know whether it is possible or not.

Thanks,
Karthee

MFGF

Quote from: karthik12345 on 11 Apr 2016 10:50:03 AM
 
   Just i am trying to know whether it is possible or not.

Thanks,
Karthee

You can base a query on a SQL statement if you need to. You can then join / union etc multiple queries into one in your report, so yes, it's possible. It's not elegant or efficient or easily maintainable or recommended, though.

Cheers!

MF.
Meep!

BigChris

QuoteIt's not elegant or efficient or easily maintainable or recommended, though.
But other than that, go for it.