Refering alias of a function result in an sql statement

Dear Sir,
How to refer an alias of a function result in sql statement?
eg.(new_name is the alias)
select myfunction(name) new_name
from mytable
where new_name = '#vincent#';
I can't refer new_name in the above statement coz it gives an error "invalid column name".
But I don't want to put the myfunction(name) again in the where clause which will double the job. So, how should I refer to it?
Please advise.
Thanks.
null

You can not refer to the alias like you are talking. You will have to use myfunction(name) as you have said. Or you can try creating a view with query:
select myfunction(name) new_name
from mytable
and then refer to "new_name".
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by guest2000:
Dear Sir,
How to refer an alias of a function result in sql statement?
eg.(new_name is the alias)
select myfunction(name) new_name
from mytable
where new_name = '#vincent#';
I can't refer new_name in the above statement coz it gives an error "invalid column name".
But I don't want to put the myfunction(name) again in the where clause which will double the job. So, how should I refer to it?
Please advise.
Thanks.<HR></BLOCKQUOTE>
null

Similar Messages

  • How to export the result from executing sql statement to excel file ?

    HI all,
    Great with Oracle SQL Developer, but I have have a trouble as follwing :
    I want to export the result from executing sql statement to excel file . I do easily like that in TOAD ,
    anyone can help me to do that ? Thanks so much
    Sigmasvn

    Hello Sue,
    I just tried to export to excel with the esdev extension and got java.lang.NumberFormatException. I found the workaround at Re: Windows Multi-language env, - how do I set English for application lang?
    open the file sqldeveloper\jdev\bin\sqldeveloper.conf and add the following two lines:
    AddVMOption -Duser.language=en
    AddVMOption -Duser.country=USyet now my date formats in excel are 'american-style' instead of german. For example 01-DEC-01 so excel does not recognize it as date and therefore I can not simply change the format.
    When export to excel will be native to 1.1 perhaps someone can have a look at this 'feature'
    Regards
    Marcus

  • Different result from same SQL statement

    The following SQL statement brings back records using query
    analyzer on the SQL server. However when I run it in a cold fusion
    page it comes back with no results. Any idea why????????
    SELECT COUNT(h.userID) AS hits, u.OCD
    FROM dbo.tbl_hits h INNER JOIN
    dbo.tlkp_users u ON h.userID = u.PIN
    WHERE (h.appName LIKE 'OPwiz%') AND (h.lu_date BETWEEN
    '05/01/07' AND '06/01/07')
    GROUP BY u.OCD
    ORDER BY u.OCD

    Anthony Spears wrote:
    > That didn't work either.
    >
    > But here is something interesting. If we use the dates
    05/01/2007 and
    > 06/01/2007 we get results in SQL Server Query Analyzer
    but not using a cold
    > fusion page. But if we use the dates 05/01/2007 and
    09/01/2007 both get back
    > the same results.
    >
    Are you absolutely, 100% sure that you are connecting to the
    same
    database instance with both CF and Query Analyzer? That kind
    of symptom
    is 9 out of 10 times because the user is looking at different
    data. One
    is looking at production and the other development or an
    backup or
    recent copy or something different.

  • Invalid identifier results from an sql statement in php

    hello there, i'm trying to access data from an oracle 11g database via oci and php 5.3.8.
    i'm getting the ORA-00904 (invalid identifier) error when executing the following statement:
    $stid = oci_parse($conn, 'select * from table1 where column1 = "XYZ"');
    when i do this:
    $searchstring = "XYZ";
    $stid = oci_parse($conn, 'select * from table1 where column1 = '.$searchstring.'');
    i'm getting this error:
    ORA-00933: SQL command not properly ended
    column1 is varchar2, the entries are either letters and numbers (never only numbers) or empty.
    when i do this:
    $stid = oci_parse($conn, 'select * from table1');
    i'm getting the data and there are entries in column1 with XYZ.
    has anyone an idea, what i do wrong?
    regards j

    The PHP forum for questions like this is at http://www.oracle.com/technetwork/forums/php/index.html
    You really need to be using a bind variable here. Otherwise you will likely suffer from poor DB performance, and also open yourself to SQL Injection security attacks. Try:
    $stid = oci_parse($conn, 'select * from table1 where column1 = :bv');
    oci_bind_by_name($stid, ":bv", $searchstring);Regarding quoting of your example try:
    $searchstring = "XYZ";
    echo  'select * from table1 where column1 = '.$searchstring.'';Then run that SQL in SQL*Plus and watch it fail. What you need is given with:
    echo  'select * from table1 where column1 = \''.$searchstring.'\'';See the bottom of p 126 of The Underground PHP and Oracle Manual
    Note that with the bind variable example you didn't need quotes around :bv.

  • SQL check result of the sql statement

    hello gurus, i have this sql statement:
    select MyTableColumn_PDF_File
    from Database.dbo.MyTableName
    where coalesce( MyTableColumn_PDF_File,' ') is null;
    so basically, it works fine on sql management studio.
    But what if I used this command on vb.net, how do I check whether the column is null or not?
    Any help is greatly appreciated.
    Thanks. :)
    Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    IT Stuff Quick Bytes

    Dim con As New SqlClient.SqlConnection("connectionstring")
    Dim DR As SqlClient.SqlDataReader = Nothing
    Try
    con.Open()
    Dim cmd As New SqlClient.SqlCommand("select COUNT(*) AS TotalNull " & _
    "from Database.dbo.MyTableName " & _
    "where MyTableColumn_PDF_File is null", mSQLConnection)
    DR = cmd.ExecuteReader()
    If DR.Read Then
    '' found rows
    If CInt(DR.Item("TotalNull")) <> 0 Then
    '' We have more than 1 row that is not null
    End If
    Else
    '' not found nows
    End If
    Catch ex As Exception
    ''' oops
    Finally
    If Not IsNothing(DR) Then
    If Not DR.IsClosed Then DR.Close()
    DR = Nothing
    End If
    If Not IsNothing(con) Then
    If con.State = ConnectionState.Open Then con.Close()
    con = Nothing
    End If
    End Try
    This is a more complete example

  • Which is better - SQL Statement in APEX or as a function returning a type?

    Hi
    I have a general question about best practices for APEX development.
    If we have say a report region based on a SQL statement, is it better (from a performance perspective) to have the SQL statement defined in the region in APEX OR have the actual select statement executed in the backend and have the result set returned in a type to APEX?
    As an example:
    In APEX region
    SELECT col1, col2, col3 FROM table_aOR
    In APEX region
    select col1, col2, col3 from TABLE(CAST(<my package>.<my proceduere > AS <my type >)) ;<my package>.<my proceduere > would obviously execute the statement
    SELECT col1, col2, col3 FROM table_ausing dynamic SQL and return the results to APEX in thy type <my type>.
    Apologies if this sounds to be a really stupid thing to ask.
    Kind regards
    Paul

    Denes Kubicek wrote:
    You should use a pipelined function only then when you can't use SQL. Otherwise SQL is the way to go.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------thanks Denes... but does it matter if:
    1. The SQL statement is actually defined in the APEX region
    or
    2: The select statement is stored in a packageD function and returned to APEX?
    I seem to recall an article I read stating that it is best for all client applications to call stored procedures and functions rather than have SQL statement embedded in the actual application?
    Kind regards
    Paul

  • Odd results from SQL statement in JSP

    Hi.
    Getting very strange results from my SQL statement housed in my JSP.
    the last part of it is like so:
    "SELECT DISTINCT AID, ACTIVE, REQUESTOR_NAME, ..." +
    "REQUESTOR_EMAIL" +
    " FROM CHANGE_CONTROL_ADMIN a INNER JOIN CHANGE_CONTROL_USER b " +
    "ON a.CHANGE_CTRL_ID = b.CHANGE_CTRL_ID " +
      " WHERE UPPER(REQUESTOR_NAME) LIKE ? ";   I've set the following variables and statements:
    String reqName = request.getParameter("requestor_name");
    PreparedStatement prepstmt = connection.prepareStatement(preparedQuery);
    prepstmt.setString(1, "%" + reqName.trim().toUpperCase() + "%");
    ResultSet rslts = prepstmt.executeQuery();
    rslts.next();
    int aidn = rslts.getInt(1);          
    int actbox = rslts.getInt(2);     String reqname = rslts.getString(3).toUpperCase();
    String reqemails = rslts.getString(4);
    String bizct = rslts.getString(5);
    String dept = rslts.getString(6);
    String loc = rslts.getString(7);
    Date datereq = rslts.getDate(8);
    String busvp = rslts.getString(9);
    AND SO ONSo then I loop it, or try to with the following:
    <%
      try {
      while ((rslts).next()) { %>
      <tr class="style17">
        <td><%=reqname%></td><td><%=reqemails %></td><td><%=bizct %></td>td><%=dept %></td>
       <td><%=aidn %></td>
      </tr>
      <%
    rslts.close();
    selstmt.close();
    catch(Exception ex){
         ex.printStackTrace();
         log("Exception", ex);
    %>AND so on, setting 13 getXXX methods of the 16 cols in the SQL statement.
    Trouble is I'm getting wildly inconsistent results.
    For example, typing 'H' (w/o quotes) will spit out 20 duplicate records of a guy named Herman, with the rest of his corresponding info correct, just repeated for some reason.
    Typing in 'He' will bring back the record twice (2 rows of the complete result set being queried).
    However, typing in 'Her' returns nothing. I could type in 'ell' (last 3 letters of his name, Winchell) and it will again return two duplicate records, but typing in 'hell' would return nothing.
    Am I omitting something crucial from the while statement that's needed to accurately print out the results set without duplicating it and that will ensure returning it?
    There's also records in the DB that I know are there but aren't being returned. Different names (i.e. Jennifer, Jesse, Jeremy) won't be returned by typing in partial name strings like Je.
    Any insight would be largely appreciated.
    One sidenote: I can go to SQL Plus and accurately return a results set through the above query. Having said that, is it possible the JDBC driver has some kind of issue?
    Message was edited by:
    bpropes20
    Message was edited by:
    bpropes20

    Am I omitting something crucial from the while
    statement that's needed to accurately print out the
    results set without duplicating it and that will
    ensure returning it?Yes.
    In this code, nothing ever changes the value of reqname or any of the other variables.
      while ((rslts).next()) { %>
      <tr class="style17">
        <td><%=reqname%></td><td><%=reqemails %></td><td><%=bizct %></td>td><%=dept %></td>
       <td><%=aidn %></td>
      </tr>
      <%
    } You code needs to be like this:while (rslts.next()) {
      reqname = rslts.getString(3).toUpperCase();
      reqemails = rslts.getString(4);
      bizct = rslts.getString(5);
      dept = rslts.getString(6);
      loc = rslts.getString(7);
      datereq = rslts.getDate(8);
      busvp = rslts.getString(9);
    %>
      <tr class="style17">
        <td><%=reqname%></td><td><%=reqemails %></td><td><%=bizct %></td>td><%=dept %></td>
       <td><%=aidn %></td>
      </tr>
      <%
    There's also records in the DB that I know are there
    but aren't being returned. Different names (i.e.
    Jennifer, Jesse, Jeremy) won't be returned by typing
    in partial name strings like Je.Well, you're half-right, your loop won't display all the rows in the result set, because you call rslts.next(); once immediately after executing the query. That advance the result set to the first row; when the loop is entered, it starts displaying at the 2nd row (or later if there are more next() calls in the code you omitted).

  • Group by Lookup function result

    I have a report that uses two datasets.
    The first one looks like this. It's the time members have recorded under a particular job title:
    ParentId TaskName ObjectiveId MemberId JobTitle TimeSpent Status
    3174ED19 TEST 3 42AA79F6 23179C0F NULL 0.00 01
    3174ED19 TEST 3 42AA79F6 596CA495 JobTitle1 9.00 01
    3174ED19 TEST 1 AEE18C46 23179C0F NULL 0.00 01
    3174ED19 TEST 1 AEE18C46 596CA495 JobTitle2 3.00 01
    3174ED19 TEST 2 AEE18C46 23179C0F NULL 0.00 01
    3174ED19 TEST 2 AEE18C46 596CA495 6.00 01
    I need to show the records which have JobTitle == null with a particular Job Title, the current one they have in Active Directory. So I use another dataset from a WCF service:
    MemberId Name JobTitle
    23179C0F Member1 JobTitle1
    Then I use a lookup function to show the correct Job Title:
    =IIF(IsNothing(Fields!JobTitle.Value) OR Fields!JobTitle.Value = "",lookup(Fields!MemberId.Value,Fields!MemberId.Value,Fields!JobTitle.Value,"Members"),Fields!JobTitle.Value)
    This works ok. The problem is that I need the data to be grouped by several fields, including the Job Title. It seems grouping happens before the lookup function is executed, so instead of grouping the NULL values along with the fields that contains the actual
    values, I end up with two groups with the same Job Title, one containing the null values and another with the actual values.
    Is there any workaround for this?
    Thanks.

    Hi EXR88,
    Per my understanding that you have add some row group in the report to group the result which include the JobTitle from the table1 and also group by the field which result comes from the lookup funtion, now the issue is the group by the Lookup function result
    isn't correct, right?
    I have tested on my local envoronment and can't reproduce the issue, please find the details information below to make sure you have done the correct setting:
    I tried to create the two tables like below:
    Table1:
     Have the same recores as you provided above.
    Table2:
    MemberId    Name      JobTitle
    23179C0F   Member1    JobTitle1
    596CA495   Member1      NULL
    After adding the LookUP function, i got the report like below:
    I add two row group base on the JobTitle(JobTitle) and the Lookup functiuon result(Lookupfunctiongroup), the Lookupfunctiongroup row group is the child group of the JobTitle like below, please make sure you have add the expression with the lookupfunction
    in the group on:
    If i have some misunderstanding, please try to provide the expectted group by  result you want to get and also the currectly result you have got.
    Any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Function result Cache in oracle 11G

    Hi,
    i am reading the following article and trying to reproduce same set of statements to learn about function result cache.
    http://www.oracle.com/technology/oramag/oracle/07-sep/o57asktom.html
    Details about my output:
    SQL> create or replace
    function not_cached
    ( p_owner in varchar2 )
    return number
    as
    l_cnt number;
    begin
    select count(*)
    into l_cnt
    from t
    where owner = p_owner;
    sys.dbms_lock.sleep(1);
    return l_cnt;
    end;
    Function created.
    Elapsed: 00:00:00.13
    SQL> create or replace
    function cached
    ( p_owner in varchar2 )
    return number
    result_cache
    relies_on(T)
    as
    l_cnt number;
    begin
    select count(*)
    into l_cnt
    from t
    where owner = p_owner;
    dbms_lock.sleep(1);
    return l_cnt;
    end;
    Function created.
    Elapsed: 00:00:00.08
    SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) );
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.06
    SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) );
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.01
    SQL> SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) );
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.02
    SQL> SQL> set serveroutput on
    SQL> exec dbms_output.put_line( not_cached( 'SCOTT' ) );
    0
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.02
    SQL> SQL> exec dbms_output.put_line( cached( 'SCOTT' ) );
    0
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.02
    SQL> SQL> exec dbms_output.put_line( cached( 'SCOTT' ) );
    0
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.02
    SQL> SQL> exec dbms_output.put_line( cached( 'SCOTT' ) );
    0
    PL/SQL procedure successfully completed.
    SQL> exec dbms_output.put_line( cached( 'SCOTT' ) );
    0
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.01
    I am supposed to get the results quickly for "cached" call. However, i still dont see any change in the response time. May i know what i am missing here?
    Thank you
    Giridhar

    Try to play with
    RESULT_CACHE_MAX_SIZE
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/initparams206.htm#REFRN10272
    RESULT_CACHE_MAX_RESULT
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/initparams205.htm#REFRN10298

  • Function result as an item for another function.

    I have a report that has a field A(number) which is the result of a custom function. My next field B needs to sum up all these results i.e. sum of field A grouped by certain field. Another field C needs to divide field B by a calculated number etc.
    Because I can't choose function result as an Item, I'd have to recalculate for field B, and again for field C etc, which degrades performance.
    Any ideas on how to tackle this problem?

    Dear Peter,
    Does this amount appear as an amount in your GL and missing in your Asset Accounts, or vice versa.
    Please, do check if there are any manual postings performed from FI, not from the depreciation program.
    They will disappear from ABST2 when you reverse them from FI.
    KR
    Severina
    Edited by: Severina Koleva on Feb 22, 2010 3:55 PM

  • DB buffer cache vs. SQL query & PL/SQL function result cache

    Hi all,
    Started preparing for OCA cert. just myself using McGraw Hill's exam guide. Have a question about memory structures.
    Actually, DB buffer cache is used to copy e.g. SELECT queries result data blocks, that can be reused by another session (server process).
    There is also additional otion - SQL query & PL/SQL function result cache (from 11g), where also stored the results of such queries.
    Do they do the same thing or nevertheless there is some difference, different purpose?
    thanks in advance...

    There is also additional otion - SQL query & PL/SQL function result cache (from 11g), where also stored the results of such queries.Result cache located in shared pool.So it is one component of shared pool.When server process execute query(and if you configured result cache) then result will store in shared pool.Then next execution time run time mechanism will detect and consider using result cache without executing this query(if data was not changed this is happen detection time)
    Do they do the same thing or nevertheless there is some difference, different purpose?.Buffer cache and result cache are different things and purpose also,but result cache introduced to improve response time of query in 11g(but such mechanism also implemented in 10g subquery execution,in complex query).In buffer cache holds data blocks but not such results.
    Edited by: Chinar on Nov 4, 2011 4:40 AM
    (Removing lots of "But" word from sentences :-) )

  • Displaying alias using MemberAlias function

    Hi,
    In my HFR report, I have Product dimension in the Page axis as user prompt. I need to display the prompt selection in the report header. For that I am using the function MemberAlias.
    MemberAlias("Grid1",Current,"Product"). But this doesn't return the alias of the selected Product member. It shows the member name.
    This problem occurs for the dimensions which are there in the Page axis. For dimensions on Row and Column axis, it works fine.
    Please help.
    Thanks in advance
    -Aparna

    Hi Aparna,
    Sorry I was a little distracted. member name can never display alias. :-)
    Actually this is a bug in a FR that page member, never shows up alias by using functions.
    Anyway what can you do as a work around, is to create a another grid having prompt on that dimension. Define prompt exactly in the same way as in the first grid. Then use merge similar prompts option in the workspace, so that user get it only once.
    Then refer the cells of the second grid to get alias inside a text box. and for that either you can use <<Getheading >> or <<MemberAlais >>
    fucntions. Hope this will help you to get what you want.
    Regards,
    Rahul

  • Populating a collection with function results

    I am calculating some statistics and need to use a collection to store the results of several function so they can be used in a procedure. Example:
    PROCEDURE PRODUCTIVITY_INSERT(p_first_of_month IN DATE)
    AS
    BEGIN
    vc_FirstofMonth := p_first_of_month;
    FOR i IN 1..3 loop
    EXECUTE IMMEDIATE 'INSERT INTO RFC_BUS'||days(i)||'PRODUCTIVITY(ROUTE,PPPH)
    SELECT a.route, ((sr05 / sy05)/'||counts(i)||') AS "RATIO"
    FROM (SELECT route,
    SUM (DECODE (TO_CHAR (pick, "MM-YYYY"),
    to_char(vc_FirstofMonth, "MM-YYYY"), platform_hours, null)) AS sy05
    FROM bus_platformhours
    WHERE day_type ='||days(i)||' and platform_hours > 0
    GROUP BY route) a,
    (SELECT route,
    SUM (DECODE (TO_CHAR (service_date, "mm-yyyy"),
    to_char(vc_FirstofMonth, "MM-YYYY"), rides, null)) AS sr05
    FROM bush_daily_rides
    WHERE day_type = '||days(i)||
    'GROUP BY route) b
    WHERE a.route = b.route
    ORDER BY a.route
    VALUES(
    p_route,
    p_ratio
    ) USING days(i), counts(i)';
    end loop;
    Can I use collections to hold the function results (say three function out variables) while they are being looped through in the procedure? If I can do that I am presuming I use the functions name in the collection such as:
    TYPE dayoneList IS TABLE OF NUMBER;
    dayone dayoneList := dayoneList(wkdaysminusone(), sadaysminusone(), sudaysminusone());
    thanks for any help you can give me.

    Do you mean to use the functions as the elements of collection constructor ?
    It's possible:
    SQL> create function get_one return number is begin return 1; end;
      2  /
    Function created.
    SQL> create function get_two return number is begin return 2; end;
      2  /
    Function created.
    SQL> declare
      2   type arr is table of number;
      3   arr1 arr := arr(get_one(), get_two());
      4  begin
      5   for i in 1..arr1.count loop
      6    dbms_output.put_line(arr1(i));
      7   end loop;
      8  end;
      9  /
    1
    2
    PL/SQL procedure successfully completed.Rgds.

  • Get the Stored Function Results

    If there is DML in my Stored Function ,how to Using View Objects to Select Stored Function Results?
    I want to get the Stored Function Results in my jsp.
    please give me the example jsp.Thanks!

    There's an article on my "Dive into BC4J" weblog that describes this.
    http://radio.weblogs.com/0118231/stories/2003/02/06/usingViewObjectsToSelectStoredFunctionResults.html

  • Using ASSOCIATED on a function result

    I'm having trouble using the ASSOCIATED intrinsic with the result of a function. It appears to work in Studio 12 but in 12.2 I get a segfault. The problem happens when the result of a function is set to null. It appears that the function result pointer somehow becomes undefined (but I'm not sure). For example the following sample program gives a segfault in Studio 12.2:
    double precision, pointer :: input=>null()
    if (associated(getY(input)) then
    print*, "associated"
    else
    print*, "not associated"
    endif
    contains
    function getY (y) result (yResult)
    double precision, pointer :: y
    double precision, pointer :: yResult
    yResult => null()
    if (associated(y)) then
    yResult=>y
    endif
    end function getY
    If however if first associate a new local variable with the function result (x=>getY(input)) I don't get a segfault when calling associated(x). Any ideas on why this happens or if I'm doing something wrong?

    I apologize for taking so long to respond.
    After modifying your code slightly so that it would compile, I was able to reproduce the problem using the Oracle Solaris Studio 12.2 release. When I compile the program with the beta compiler for release 12.3, it works correctly. The output is
    not associated
    I hope the problem has been resolved.
    Robert Corbett

Maybe you are looking for

  • SCCM 2012 Report Problem

    hi there, we are using sccm 2012 with reports functionality on SQL 2008 R2 since 2 weeks now and everything is working fine, including reports. most of the time i monitor the reports for "Status for a specified task sequence deployment on a specific

  • JS and PDF generation

    Lets say I want to share a pdf but I want whoever is visioning it to have JS enabled, otherwise i don't want to display the pdf. Can I share a 'blank' pdf with only JS code in it that will generate a new pdf with all the text I want in it? Will this

  • Non-conforming RAM

    I'm wondering if I can use 2 RAM sticks from a 2010 iMac in a Late 2012 machine - it's easy to try and I might experiment with this just for the heck of it. The only difference in the spec is speed - 1333 MHz  (2010) vs 1600 MHz  (2012) The machine I

  • Increase the data access time in custom development scenarios,layouts etc.

    Hello All, We have developed some custom scenario come interface for our Man-hours planning and actual posting. We have also included some validation in them from time to time. Now, it has started taking much processing time during data entry as well

  • Oracle Access Manager AND Jdev

    We plan to use Access manager et the front end of Jdev ADFBC JSF web application .. How can we integrate our java application with Access Manager We can't find any code or application sample about that... Any extention planned for Access Manager like