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

how to know the today's hired employee name

Started by inu, 20 Mar 2014 01:19:29 AM

Previous topic - Next topic

inu

HI
How can i get the names of employees who have been hired today itself.

Please give the syntax. i m new to cognos and database

Regards
Inam

CognosPaul

Inam,

There is no way for anyone to answer this effectively. We are not familiar with your system. Looking at your latest post, I see that you're using Oracle. Apart from that, there is no way for me to know how your database contains this information. Is there an employee table? Is there a separate employee history table? Is it a slowly changing? Is there an ETL process that populates those tables? Are you referencing these tables in your framework model? Have you contacted the framework modeler?

Before continuing, I strongly recommend reading tutorials on PL/SQL (a good one here) and paying for Cognos training. A basic understanding of SQL is absolutely essential if you are planning on working with Report Studio. I also recommend having your company arrange an internal training for the framework model.

nblank

For a solution I can imagine there is a table in the database containing your employee's contracts.

EMP DATE_START      DATE_END
1      01-01-2014      null
2      01-04-2013      31-12-2013
3      01-01-2014      31-03-2014

So if you ask for the number of employee's today (20-03-2014):

with emp as  (
select 1 EMP , to_date('01-01-2014','dd-mm-yyyy') date_start     , null                                                     date_end  from dual union
select 2        , to_date('01-04-2013','dd-mm-yyyy')                       , to_date('31-12-2013','dd-mm-yyyy')                    from dual  union
select 3        , to_date('01-01-2014','dd-mm-yyyy')                       , to_date('31-03-2014','dd-mm-yyyy')                    from dual   
)
select count(distinct EMP) nbr_of_emp from emp where SYSDATE between DATE_START and nvl(DATE_END , (SYSDATE + 1))

The result = 2