List functions: Comparing lists... in SQL statements?

Hello
I got a table with a column containing comma-separated
values, p.e.
row 1: 45,67,2,90,67
row 2: 34,7,23,9,7
row 3: 4
row 4: 567,8,90
now I would like to find the rows containing p.e. 4 and 90.
the search input comes in a list 4,90
my results should be row 1, row 3 and row 4.
how do I write the WHERE clause in SQL?
thank you so much for hints...

As Dan alluded to, you need to fix your data model. However,
you say you can't do this, but you ask: "how do I write the WHERE
clause in SQL?"
SQL isn't designed to help you continue to use a faulty data
model. Thus, there isn't a nice way to write what you want, and
it's going to be dog-slow.
For each item in the list you're searching for (4,90 in your
example), you need to check 4 options:
Is this element at the beginning of my list? WHERE row LIKE
'#element#,%'
Is this element at the end of my list? WHERE row LIKE
'%,#element#'
Is this element in the middle of my list? WHERE row LIKE
'%,#element#,%'
Is this the only element in the list? WHERE row = '#element#'
You can see how this gets crazy.
<cfset listToSearchFor = "4,90">
<cfquery ...>
SELECT * FROM tablename WHERE
<cfloop list="#listToSearchFor#" index="idx">
row LIKE '#idx#,%' OR
row LIKE '%,#idx#' OR
row LIKE '%,#idx#,%' OR
row = '#idx#' OR
</cfloop>
1 = 2
</cfquery>
All of these OR LIKE checks are gonna make the query slower
and slower.
In the future, never EVER store a comma-delimited list in a
database field. You want to break it out into another table. How do
you do that? I'm glad you asked... In your example, where Row 1 =
"45,67,2,90,67", assume the primary key for that row is "12"...
Main_Table
id
Whatever_Table (You'd name this table based on what these ids
stand for in the row list)
main_id foreign key references main_table(id)
whatever_id
So your Main_Table would have an entry with an ID of 12 and
Whatever_Table would contain:
main_id whatever_id
12 45
12 67
12 2
12 90
12 67
Now you can get all the whatever_id values for a given
main_id by:
select whatever_id from whatever_table where main_id = 12;
And to answer your original question, you can do:
SELECT Main_Table.* FROM Main_Table JOIN Whatever_Table ON
(Main.id = Whatever_Table.main_id)
WHERE whatever_id IN (4,90)
Lots easier, huh?

Similar Messages

  • Compare blob in SQL statement

    Hi,
    Is it possible to compare blob in SQL statement?
    Example:
    Table1 (id number
    image long raw);
    Table2 (name varchar2
    pic long raw);
    select id, name from table1, table2
    where image = pic

    Hi,
    Try the following and see if it works :
    I have TEXT in the LONG RAW column and not image
    files.
    Method I
    You can use PL/SQL to check if the 2 Long RAW Columns are
    identical or not :
    NOTE :- PL/SQL however has a limitation of processing
    data size less than 32k in size. If the
    Long Raw column exceeds 32k in size then PL/SQL
    cannot be used.
    SQL> desc temp9;
    Name Null? Type
    ID NUMBER
    COL1 LONG RAW
    SQL> desc temp9a;
    Name Null? Type
    ID NUMBER
    COL1 LONG RAW
    SQL> @t
    Id = 1, Long Raw is not the same
    Id = 2, Long Raw is the same
    PL/SQL procedure successfully completed.
    SQL> select id from temp9;
    ID
    1
    2
    SQL> get t
    1 Set ServerOutput On Size 999999;
    2 Declare
    3 CURSOR c1 Is
    4 Select id, col1
    5 from temp9;
    6 xCol1 Temp9a.Col1%Type;
    7 BEGIN
    8 For x In c1 Loop
    9 Select col1
    10 Into xCol1
    11 From temp9a
    12 Where id = x.id;
    13 If ( x.col1 = xCol1) Then
    14 Dbms_Output.Put_Line ('Id = ' || x.id || ', Long Raw is the same');
    15 Else
    16 Dbms_Output.Put_Line ('Id = ' || x.id || ', Long Raw is not the same');
    17 End If;
    18 End Loop;
    19 END;
    20* /
    Method II
    You can create a Database function for the above script and use it within
    your SQL .
    -- Shailender Mehta --

  • Compare date in SQL statement

    yup.. how can i compare date in SQL statement??
    pls give me a completed example.

    I'd think this is a formatting problem. Why not try:
    PreparedStatement ps = myConnection.prepareStatement(
    "SELECT * FROM Receipt WHERE to_date(Date) > ? ");
    ps.setDate(1,TodayDate);
    ResultSet rs = ps.executeQuery();
    HTH,
    Ken

  • 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

  • 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

  • Toplink generate the SQL statement correctly but it does not return any row

    Hi
    I faced an strange problem when using Toplink as JPA provider. Following snippet shows how I create and execute a query using Toplink JPA:
    q = em.createQuery("SELECT B FROM Branch B WHERE B.street LIKE :street");
    q.setParameter("street", "'%a%'");
       List<Branch> l = q.getResultList();
      System.out.println("List Size: " + l.size());The SQL statement resulted by this query is as follow (according to the generated log file)
    SELECT ID, STREET FROM BRANCH WHERE (STREET LIKE CAST (? AS VARCHAR(32672) ))
      bind => [%a%]Problem is that List size is always 0, independent of what I provide as parameter. I tried and executed the generated SQL statement in the SQL manager and I got some tens of record as the result. The SQL statement i tested in the SQL manager is like:
    SELECT ID, STREET FROM BRANCH WHERE (STREET LIKE CAST ('%a%' AS VARCHAR(32672) ))Can someone please let me know what I am missing and how I can fix this problem?
    Thanks.

    Hi,
    Thank you for reply.
    All data are stored in lower case so, the case sensitivity is not a problem. I am wondering how the generated query works fine when I execute it in the sql manager but it return no result when it is executed by the JPA.
    Thanks for looking into my problem.

  • SQL Statement ignored performing List of Values query

    Hi, New user just learning the basics. I have created a simple table PERSON with columns, ID, firstname, lastname, phone, city, State_ID
    Then clicked create Lookup table - State_Lookup with columns State_ID and State_Name.
    I create a page, include all columns from PERSON. For State the field is a select list that should do a lookup form the STATE_LOOKUP table. (I have entered 4 states in the table)
    I am getting the following error however:
    Error: ORA-06550: line 1, column 14: PL/SQL: ORA-00904: "STATE_ID": invalid identifier ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored performing List of Values query: "select STATE_ID d, STATE_ID v from STATE_ID_LOOKUP order by 1".
    I have not entered any sql, just selected all of my options using defaults and dropdowns. What is causing the error and what do I need to change?
    Thanks

    Okay, learned something: The database link name used, must not contain a dash. The DB_DOMAIN is appended automatically when you create a DB link, so if IT contains a dash, the db link name does as well. Check DBA_DB_LINKS to make sure you don't hit this well-hidden feature.
    Regards
    Martin Klier
    [http://www.usn-it.de|http://www.usn-it.de]

  • Calling function from list of values section?

    can i call a function from list of values(LOV) section as well? I know we can sql query but udf is supported?

    See this recent thread: Display as Text (LOV) or join
    Scott

  • SQL statement with Function returns slow in Interactive Report

    I have an Interactive Report that returns well but when I add in a function call in the where clause that does nothing but return a hard coded string of primary keys and is compared to a table's primary key with a like operator the performance tanks. Here is the example:
    get_school2_section(Y.pk_id,M.pk_id,I.section,:P577_SECTION_SHUTTLE) LIKE '%:' || I.pk_id || ':%'
    I have the values hard coded in the return of the function. There are no cursors run in the function, there is no processing done in the function. It only declares a variable. Sets the variable, and returns that variable back to the SQL statement.
    I can hard code the where clause value to look like this:
    ':90D8D830A877CCFFE040010A347D1A50:8ED0BBFDEAACC629E040010A347D6471:9800B8FDBD22B761E040010A347D0D9A:' LIKE '%:' || I.pk_id || ':%'
    This returns fast. When I add in the function call which returns the same hard coded values, the page goes from returning in 1 to 2 seconds to 45 or more seconds.
    Why does adding a simple function call into the where clause cause such a deterioration in performance.
    Edited by: alamantia on Aug 17, 2011 7:39 AM
    Edited by: alamantia on Aug 17, 2011 7:40 AM

    So you are telling me that the where clause with a function call will NOT run the function on every row? Please explain that to me further?
    if you have code that is the following:
    select a,b,c from a_table where a > 2 and b < 3 and function_call(c) > 0You are telling me that Oracle will NOT call that function on EVERY row it tries to process in the select?
    Thank you,
    Tony Miller
    Webster, TX
    I cried because I did not have an office with a door until I met a man who had no cubicle.
    -Dilbert
    If this question is answered, please mark the thread as closed and assign points where earned..

  • How to display list process, when i run sql*loader in c#

    Hello,
    How to display list process, when i run sql*loader in c#. I mean when i run sql*loader from cmd windows, i get list process how many row has been inserted. But when i run SQL*Loader from C#, i can't get process SQL*Loader.
    This is my code:
    string strCmd, strSQLLoader;
    string strLoaderFile = "XLLOAD.CTL";
    string strLogFile = "XLLOAD_LOG.LOG";
    string strCSVPath = @"E:\APT\WorkingFolder\WorkingFolder\sqlloader\sqlloader\bin\Debug\8testskrip_HTTP.csv";
    string options = "OPTIONS (SKIP=1, DIRECT=TRUE, ROWS=1000000,BINDSIZE=512000)";
    string append = "APPEND INTO TABLE XL_XDR FIELDS TERMINATED BY ','";
    string table = "OPTIONALLY ENCLOSED BY '\"' TRAILING NULLCOLS (xdr_id,xdr_type,session_start_time,session_end_time,session_last_update_time,session_flag,version,connection_row_count,error_code,method,host_len,host,url_len,url,connection_start_time,connection_last_update_time,connection_flag,connection_id,total_event_count,tunnel_pair_id,responsiveness_type,client_port,payload_type,virtual_type,vid_client,vid_server,client_addr,server_addr,client_tunnel_addr,server_tunnel_addr,error_code_2,ipid,c2s_pkts,c2s_octets,s2c_pkts,s2c_octets,num_succ_trans,connect_time,total_resp,timeouts,retries,rai,tcp_syns,tcp_syn_acks,tcp_syn_resets,tcp_syn_fins,event_type,flags,time_stamp,event_id,event_code)";
    strCmd = "sqlldr xl/secreat@o11g control=" + strLoaderFile + " LOG=" + strLogFile;
    System.IO.DirectoryInfo di;
    try
    System.Diagnostics.ProcessStartInfo cmdProcessInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe");
    di = new DirectoryInfo(strCSVPath);
    strSQLLoader = "";
    strSQLLoader += "LOAD DATA INFILE '" + strCSVPath.ToString().Trim() + "' " + append + " " + table;
    StreamWriter writer = new StreamWriter(strLoaderFile);
    writer.WriteLine(strSQLLoader);
    writer.Flush();
    writer.Close();
    // Redirect both streams so we can write/read them.
    cmdProcessInfo.RedirectStandardInput = true;
    cmdProcessInfo.RedirectStandardOutput = true;
    cmdProcessInfo.UseShellExecute = false;
    cmdProcessInfo.LoadUserProfile = true;
    //System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
    // Start the procses.
    System.Diagnostics.Process pro = System.Diagnostics.Process.Start(cmdProcessInfo);
    // Issue the dir command.
    pro.StandardInput.WriteLine(strCmd);
    // Exit the application.
    pro.StandardInput.WriteLine("exit");
    //Process[] processlist = Process.GetProcesses();
    //foreach(Process pro in processlist){
    Console.WriteLine("Process: {0} ID: {1}", pro.ProcessName, pro.Id);
    Console.WriteLine(pro.StandardOutput.ReadLine());
    // Read all the output generated from it.
    string strOutput;
    strOutput = pro.StandardOutput.ReadToEnd();
    pro.Dispose();
    catch (Exception ex)
    return;
    finally
    Thanks.

    friend
    sqlldr is an application residing in the OS. procedure runs in the dbms engine.
    you cannot run an os command directly from a procedure or a function or a package .
    If you want to do so you need to use either a daemon process created by a PRO*C program
    or a JAVA stored procedure to do so.
    just refer to previous question forums, you can find the solution. Somebody has already given a solution using
    java to run an OS command . check it out
    prakash
    [email protected]

  • How to Compare Lists of Objects

    Hello All,
    I have two lists(self developed; not using Java's inherent list functionality) containing objects of the same class. Now I would like to compare the elements within the lists one on one.
    Meaning, I would like to compare the two lists to see whether they contain identical elements or not.
    How should I do this.
    Please help !!
    Thank you.

    If there is an implicit order on your objects then
    1.) Write a Comparator for your objects
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/Comparator.html
    2.) Sort both lists
    3.) int j = 0;
    FOR EACH item IN list1 DO
      WHILE list2.get(j) IS LESS THAN item DO
        ++j;
      OD
      IF item EQUALS list2.get(j) THEN
        PRINT "Found dups " + item + " and " + list2.get(j)
      FI
    ODIf there exists no implicit ordering, you can only use the trivial solution:FOR EACH item1 IN list1 DO
      FOR EACH item2 IN list2 DO
        IF item1 EQUALS item2 THEN
          PRINT "Found dups " + item1 + " and " + item2
        FI
      OD
    OD(BTW - this is pseudo-code)
    ... or put you stuff in to Sets and use retainAll ...

  • Input solicited: List function support as member functions in CFML

    G'day:
    I'm concerned about how Adobe have implemented the list-oriented member functions in ColdFusion 11. And I was hopeing to capture some community input as to what other people think, before raising it with Adobe:
    Survey: lists in CFML, and the naming of list member functions
    It'd be cool if you could take the time to complete the survey.
    Thanks.
    Adam

    ruerric wrote:
    I created a custom class called Rooms with all the appropriate setters and getters.Arguably, getters and setters are seldom appropriate.
    I iterated through a csv file and input all of the data into my custom object class and then put that object into a list by using list.add().
    Now I want to access the class methods through the use of the list.. how can I do so?
    How I declared my list:
    List list = new ArrayList<Rooms>(); // List implemented as growable array
    Rooms xxx = (Rooms).list.get(20);
    Says illegal start of type error.. What are you actually trying to accomplish here? Is list a static field of Rooms?
    Also, I want to sort the list by the room capacity. My Rooms class has a .setCap and .getCap function but how can I sort the list using that?
    From what I know about list.. it has a sort method but not exactly the way I want to sort a custom made class object..List doesn't have a sort method. There's a method in java.util.Collections to sort a list. I think it's "sort". You can pass it a java.util.Comparator that you write, to sort by whatever criteria you like.
    Question: will the capacity of a room ever change? In real life, if you build a hotel, and a room has a capacity of 3 persons, does the room ever change capacity? If the capacity never changes, then it's debatable whether you really need a setCap() method. It would be better to set the capacity once, in the constructor, and leave it.

  • CutinTwo function for lists

    I'm trying to do this CutinTwo function to use in another function called generalsort.
    This function takes in a list, and returns 2 lists that are the result of splitting the list that is takin in by the function. I got the base case, but I'm having trouble with the recursive call. My problem is, I'm trying to get a pointer to point to the middle element of the list, so that way I can cut the list in half.
    Here is what I have so far:
    public void CutInTwo(list L1)
              list L2 = new list();
              if(L1.size == 1)
           return;
           else
                      Node current = L1.head;
                      int temp = L1.size / 2;
                      /*this part is the problem.  I can't figure out how to get to the middle
                    of the list.  The temp variable will return the the position where the   
                   pointer should be, but lists and integers are not of the same type, so
                 how can I find out the middle of a list by using only list variables.   */
            }Thanks

    Lol,
    yea, it's for an assignment for school. Believe me if I wouldn't have had to write my own list class, I wouldn't have.
    This is the actual question I'm working on, if anyone cares to see:
    2. QUESTION 1b
    Write a function GeneralSort that meets this specification:
         Inputs: a list L, and a procedure CutInTwo that meets the specification below
         Outputs: L' (i.e. L is changed), and two integers: Nc, Njs
         Preconditions: L is defined
         Postconditions: L' is sorted in increasing order. Nc is the total number of times
              two list elements were compared during the sorting process, including the
              comparisons made by the Merge and CutInTwo functions. Njs is the total
              number of join and split operations that were performed during the sorting
              process, including the joins and splits done by the Merge and CutInTwo
              functions.
         GeneralSort must use the "general sorting strategy" (described in detail in class):
         1. Use the procedure CutInTwo to divide L into two pieces
         2. Recursively sort the two pieces
         3. Merge the results (use the function written in Question 1a).
    The function CutInTwo meets this specification:
         Input: a list L1
         Outputs: L1' (i.e. L1 is changed), L2 (a list), and two integers, Nc and Njs
         Preconditions: L1 has 2 or more elements
         Postconditions: neither L1' nor L2 is empty, and collectively they contain all the
              elements of L1 (and nothing else). Nc is the number of times two list
              elements were compared during the cut_in_two process. Njs is the total
              number of join and split operations that were performed during the
              CutInTwo process.
    right now I'm having some trouble with the syntax for the generalsort recursive call and the merging of the two lists.
    If anyone can help me out, that would be great,
    Thanks

  • I just changed my residence to the US and now I cant register my new US credit card on itunes cause the state list doesnt match to the US states, what should I do?

    I just changed my residence to the US and now I cant register my new US credit card on itunes cause the state list doesnt match to the US states, what should I do?

    Your credit card info, billing address must be the same country as the iTunes store country you registering.
    For example, you can’t have a credit card from a U.S. bank with  a U.S. billing address registered in the iTunes store for China.
    I tried to change my payment information too, but it happened the same, I can change the information but when I get to the state part, it only shows the other country states
    Remove all payment info and save it.
    Then change the iTunes store country to U.S., add a U.S. credit card with a U.S. billing address.
    As previously suggested, if this does not work, contact iTunes store support.
    -> http://www.apple.com/support/itunes/contact/

  • SQLEXEC not able to filter extract on sql statement or function call.

    hi all,
    i'm trying to do some basic extract filtering using a stored function and am not having much success.
    i started off using a procedure call but have been unsuccessful getting that working, i've simplified
    it to use a sql statement calling a function for a value to filter on, but cannot even get that to work.
    i've read through the documentation and i cannot figure out what is going wrong.
    any help would be much appreciated.
    thx,
    daniel
    function code is very simple, just trying to get something working.
    FUNCTION f_lookup_offer_id(v_offer_id IN offer.offer_id%TYPE)
    RETURN company.name%TYPE IS
    lv_company_name company.name%TYPE;
    BEGIN
    SELECT c.name
    INTO lv_company_name
    FROM orders a, offer b, company c
    WHERE a.offer_id = b.offer_id
    AND b.company_id = c.company_id
    AND a.order_id = v_order_id;
    RETURN lv_company_name;
    END f_lookup_offer_id ;
    Oracle GoldenGate Command Interpreter for Oracle
    Version 11.1.1.0.0 Build 078
    Solaris, sparc, 64bit (optimized), Oracle 10 on Jul 28 2010 13:26:39
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    EXTRACT EATUOP1
    INCLUDE ./dirprm/GGS_LOGIN.inc
    EXTTRAIL ./dirdat/up
    DISCARDFILE ./dirout/eatuop1.dsc, append , MEGABYTES 50
    DISCARDROLLOVER ON SUNDAY AT 06:00
    -- Database and DDL Options
    -- Added to avoid errors when setting unused columns
    DBOPTIONS ALLOWUNUSEDCOLUMN
    -- Get full row for deletes
    NOCOMPRESSDELETES
    -- Get updates before
    GETUPDATEBEFORES
    -- If commit SCN that is not greater than the highest SCN already processed error
    THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 15000 IOLATENCY 6000
    -- Retains original timestamp. Currently using GMT
    NOTCPSOURCETIMER
    --TABLE DEFS
    TABLE master.OFFER,
    SQLEXEC ( ID ck_offer,
    QUERY " select master.f_lookup_offer_id(:off_id) is_company from dual ",
    PARAMS (off_id = offer_id),
    BEFOREFILTER),
    FILTER (@GETVAL (ck_offer.is_company = "Google, Inc."));
    does not give any errors, but also does not capture any data, it's filtering everything out and trail files are empty, minus a header.
    thoughts or help?
    2012-04-04 22:17:36 INFO OGG-00993 Oracle GoldenGate Capture for Oracle, eatuop1.prm: EXTRACT EATUOP1 started.
    2012-04-04 22:17:36 INFO OGG-01055 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Recovery initialization completed for target file ./dirdat/up000022, at RBA 978.
    2012-04-04 22:17:36 INFO OGG-01478 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Output file ./dirdat/up is using format RELEASE 10.4/11.1.
    2012-04-04 22:17:36 INFO OGG-01026 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Rolling over remote file ./dirdat/up000022.
    2012-04-04 22:17:36 INFO OGG-01053 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Recovery completed for target file ./dirdat/up000023, at RBA 978.
    2012-04-04 22:17:36 INFO OGG-01057 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Recovery completed for all targets.
    2012-04-04 22:17:36 INFO OGG-01517 Oracle GoldenGate Capture for Oracle, eatuop1.prm: Position of first record processed Sequence 13469, RBA 21894160, SCN 1789.722275534, Apr 4, 2012 10:12:40 PM.
    -rw-rw-rw- 1 svc_ggs 502 978 Apr 4 22:17 up000023

    got it working, this seems to be about as simple as i could formulate it. thanks for pointing me in the right direction.
    TABLE GGS_TEST_EXT, &
    SQLEXEC ( ID co_count, &
    QUERY " select f_lookup_company_name(:P1) x from dual ", &
    PARAMS ( P1 = company_id), BEFOREFILTER), &
    FILTER ( @GETVAL (co_count.x = 0) );
    then i have a function that returns 1 or 0, depending on the company id passed in.
    thx,
    daniel

Maybe you are looking for

  • Installing 11gR1 CRS and receive error when executing root.sh on 2nd node of 2 node cluster

    This is the error from the execution of root.sh on 2nd node of 2 node RAC cluster: dhzusbx98: /u01/app/crs # ./root.sh WARNING: directory '/u01/app' is not owned by root Checking to see if Oracle CRS stack is already configured /etc/oracle does not e

  • Why we need ABAP if we can connect With Crystal Reports to SAP R/3

    Hi,     I am new to Crystal reports.I came to know that we can connect SAP R/3 by using SAP InfoSet,SAP Table Cluster and Function connectivity in Crystal Reports.So we can generate reports for SAP R/3 database with out need of ABAP.So why we need to

  • I'm having trouble connecting my iPod to my computer

    when I plug my iPod on my computer, it says scan and check so I press scan and check then it says that my iPod was fixed but after that, i try to sync my ipod, itunes says that it failed so i tried restoring it. it is still doing the same thing so no

  • Upgrade to 2007

    Mainstream maintenance for SAP B1 2005A SP1 will end on July 31. Will SAP stop to support clients with 2005A SP1? The same questions regarding SQL2000. If some of the customers has SQL 2000 will SAP stop to support them? Thanks, Olga

  • Cobras export Error

    We are upgrading from Unity Conncection 7.X MCS to 9.1 on UCS and we get the following error right before the import completes.  The import completes successfully but I just want to make sure we won't have any issues given the following error: [Threa