Query to get all active customers in oracle apps

Hi All,
I want to grab all active customers account number, customer name, email address, tel number. Could any one give me the query to get it.
Thanks,
Red.

Hi,
Please refer to this document, and see if it helps.
Note: 68046.1 - SQL Scripts To Extract Information Relating To A Particular Customer
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=68046.1
Regards,
Hussein

Similar Messages

  • Oracle query to get all occurences of a text in a string

    Hi
    Does anybody know how to write a query to get all occurences of a text in a string in different rows of the table
    For eg:
    I have a string <aa>bb</aa><aa>cc</aa><aa>ddd</aa>
    I have to find every occurence of <aa> and get the data between <aa> and </aa>
    So the output should be
    bb
    cc
    ddd
    I think this can be done by using a regular expression but I dont know how.
    Can anyone help me?
    Thanks in advance.

    user2360027 wrote:
    BluShadow,
    The query gives correct results if i only have <aa></aa>
    What if i have <ff></ff>?
    Example:
    <aa>bb</aa><aa>cc</aa><aa>ddd</aa><ff>dsd</ff>
    I want to have the following (dsd should not be there in the result)
    bb
    cc
    dddThis is a new requirement and not what you asked for in your original post. Perhaps you should tell us exactly what you are trying to achieve and what database version you are using to save us guessing.
    To crokitta,
    This version will deal with multiple rows..
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select '<aa>bb</aa><aa>cc</aa><aa>ddd</aa>' as x from dual union all
      2             select '<aa>xx</aa><aa>yy</aa>' from dual)
      3  -- end of test data
      4  select x, vals
      5  from (
      6    select x, regexp_replace(REGEXP_SUBSTR (x, '>[^<]+', 1, lvl),'[<>]') as vals
      7    from t
      8        ,(select level lvl from dual connect by level <= (select max(length(regexp_replace(x,'[^>]*'))/2) from t))
      9    )
    10  where vals is not null
    11* order by 1,2
    SQL> /
    X                                  VALS
    <aa>bb</aa><aa>cc</aa><aa>ddd</aa> bb
    <aa>bb</aa><aa>cc</aa><aa>ddd</aa> cc
    <aa>bb</aa><aa>cc</aa><aa>ddd</aa> ddd
    <aa>xx</aa><aa>yy</aa>             xx
    <aa>xx</aa><aa>yy</aa>             yy
    SQL>

  • SQL Query to get All AD Groups and its users in Active Directory

    Hi,
       Is there any query to get all AD groups and its user in an instance of a SQL server?

    Check this blog.
    http://www.mikefal.net/2011/04/18/monday-scripts-%E2%80%93-xp_logininfo/
    It will give you more than what is required. If you dont want the extra information,then you can try this.. I took the query and removed the bits that you might not require.
    declare @winlogins table
    (acct_name sysname,
    acct_type varchar(10),
    act_priv varchar(10),
    login_name sysname,
    perm_path sysname)
    declare @group sysname
    declare recscan cursor for
    select name from sys.server_principals
    where type = 'G' and name not like 'NT%'
    open recscan
    fetch next from recscan into @group
    while @@FETCH_STATUS = 0
    begin
    insert into @winlogins
    exec xp_logininfo @group,'members'
    fetch next from recscan into @group
    end
    close recscan
    deallocate recscan
    select
    u.name,
    u.type_desc,
    wl.login_name,
    wl.acct_type
    from sys.server_principals u
    inner join @winlogins wl on u.name = wl.perm_path
    where u.type = 'G'
    order by u.name,wl.login_name
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • VO To get all active employees

    Hi All,
    Can any body tell the query to get all the active employees in the Organization.
    Thanks
    UMA

    This depends on the functionality and hence should be posted in the respective product team's forum. Generally, we should have "start date" and "end date". So, check with Start_Date <= sysdate and end_date = null.
    Regards,
    Guru.

  • Query to get all ports assigned and used by EBS instance.

    Hi,
    Can some one pleaase help to get
    Query to get all ports assigned and used by EBS instance.
    Help is appreaciated.
    Regards,
    Milan

    MILAN RATHOD wrote:
    Hi,
    Can some one pleaase help to get
    Query to get all ports assigned and used by EBS instance.
    Help is appreaciated.
    Regards,
    MilanIn addition to the thread referenced above by Helios, please check the context files and (Oracle E-Business Suite R12 Configuration in a DMZ [ID 380490.1] -- F. List of Ports to Open in a DMZ Configuration).
    Thanks,
    Hussein

  • Query for getting all function and procedure inside the packages

    hi All
    Please provide me Query for getting all function and procedure inside the packages
    thanks

    As Todd said, you can use user_arguments data dictionary or you can join user_objects and user_procedures like below to get the name of the packaged function and procedure names.
    If you are looking for the packaged procedures and functions source then use user_source data dictionary
    select a.object_name,a.procedure_name from user_procedures a,
                  user_objects b
    where a.object_name is not null
    and a.procedure_name is not null
    and b.object_type='PACKAGE'        
    and a.object_name=b.object_name

  • How to get Client IP address in oracle apps. Are there any API's.

    hi,
    I have one query
    ->How to get Client IP address in oracle apps. Are there any API's.
    regards,
    krishna

    Hi,
    this is very usefull
    however are this data stored on the db or is only a temporary view?
    I would like to have to keep track of all client connected.
    Thanx a lot

  • How do I get all of my music and apps from my iPhone on to my new iPad ?

    How do I get all of my music and apps from my iPhone on to my new iPad

    For the items you mention you sync them both to the same iTunes library which acts as master archive and source for all your mobile devices.

  • Extend existing tsql query to get all customers, even if they have no instances of the previous query - thought this would be easy, but...

    Hi all,
    The previous query is absolutely ok.
    The only thing i want to change is ...
    get all the previous available ve1 AND NEW: if a AGNR has no ve1-instance, regardless get an ve1-instance with the agnr filled but f.e. the other fields empty
    The grouping could made in reporting-logic later, and not in the tsql-query.
    resultset i need:
    - all agnr, if the have an ve1-instance or not
    Groups (hierarchy) i need, later in Report:
    - AGNR
       - ve1 (with all the left joind fields pg, vnfk, vnpk, vm (if they are)
       - if a agnr has no instance of ve1 --> print: "NO ver available"
    SELECT
    ve1.new_verid,
    ve1.new_no,
    ve1.statuscode,
    ve1.statuscodename,
    ve1.createdon,
    ve1.createdby,
    ve1.createdbyname,
    ve1.new_begin,
    DATEPART(yyyy, ve1.new_begin) AS begin_year,
    ve1.new_end,
    ve1.new_vn_fid,
    ve1.new_vn_fidname,
    ve1.new_vn_kid,
    ve1.new_vn_kidname,
    vnpk.new_how_old,
    ve1.new_vg,
    ve1.new_vgname,
    ve1.new_vs,
    ve1.new_vsname,
    ve1.new_vstat,
    ve1.new_vstatname,
    ve1.new_zw,
    ve1.new_zwname,
    ve1.new_bn_zw,
    ve1.new_rlz_v,
    ve1.new_pgid,
    ve1.new_pgidname,
    pg.accountnumber as pg_accountno,
    ve1.new_agnr_agnr_avmid,
    ve1.new_agnr_agnr_avmidname,
    AGNR.new_vm_kid AS vm_contactid,
    AGNR.new_vm_kidname AS vm_contactidname,
    ve1.new_efv,
    ve1.new_efvname,
    CASE
    WHEN ve1.new_vn_kid IS NOT NULL THEN 'Private Customer'
    WHEN ve1.new_vn_fid IS NOT NULL THEN 'Account Customer'
    ELSE 'Kunde'
    END AS kunde_typ,
    DATEPART(yyyy, vnpk.birthdate) as vnpk_birth_year,
    CASE
    WHEN ((ve1.new_rlz_v IS NOT NULL) OR (ve1.new_rlz_v > 0))
    THEN ve1.new_rlz_v
    WHEN (DATEPART(yyyy, ve1.new_begin) IS NOT NULL) AND (DATEPART(yyyy, vnpk.birthdate) IS NOT NULL)
    THEN 65 - ((DATEPART(yyyy, ve1.new_begin)) - (DATEPART(yyyy, vnpk.birthdate)))
    ELSE 20
    END AS vlz_calc,
    CASE
    WHEN ((ve1.new_bnj IS NOT NULL) OR (ve1.new_bnj > 0)) THEN ve1.new_bnj
    WHEN ((ve1.new_bn_zw IS NOT NULL) OR (ve1.new_bn_zw > 0))
    THEN
    CASE
    WHEN new_zw = '100000008' THEN ve1.new_bn_zw * 12
    WHEN new_zw = '100000004' THEN ve1.new_bn_zw * 4
    WHEN new_zw = '100000002' THEN ve1.new_bn_zw * 2
    WHEN new_zw = '100000001' THEN ve1.new_bn_zw * 1
    WHEN new_zw = '100000006' THEN ve1.new_bn_zw
    ELSE 0
    END
    ELSE 0
    END AS bnj_calc
    FROM
    Filterednew_ver AS ve1
    LEFT OUTER JOIN Filterednew_agnr AS AGNR
    ON ve1.new_agnr_agnr_avmid = AGNR.new_agnrid
    LEFT OUTER JOIN FilteredAccount AS pg
    ON ve1.new_pgid = pg.accountid
    LEFT OUTER JOIN FilteredAccount AS vnfk
    ON ve1.new_vn_fid = vnfk.accountid
    LEFT OUTER JOIN FilteredContact AS vnpk
    ON ve1.new_vn_kid = vnpk.contactid
    LEFT OUTER JOIN FilteredContact AS vm
    ON AGNR.new_vm_kid = vm.contactid
    WHERE
    (ve1.createdon >= @Begin_Week)
    AND (ve1.createdon <= @End_Week)
    AND (ve1.new_vg = @vg)
    AND (ve1.statuscode = '1')
    AND (ve1.new_efv <> '100000000' OR ve1.new_efv IS NULL)
    AND (ve1.new_vstat <> '100000004' OR ve1.new_vstat IS NULL)
    AND (ve1.new_zw IN ('100000008','100000004','100000002','100000001','100000006'))
    ORDER BY
    ve1.createdon
    i thought, and tried with right joins, but i think i need to change the sight (the complete query)?
    thx for all kind of help
    Greets Peb

    Hi Peb,
    Please provide sample data and expected results.

  • Get All sql history in oracle 10g

    How to get all select and insert statement from the beginning in the oracle? I tried, "select * from v$sqlarea;" but it's giving only today results, but i need all select and insert statement from the beginning where oracle installed or before particular month. Thanks in advance.

    Thanks Sir for sharing this pause feature with query output
    col stmtid 
    heading 'Stmt Id'          
    format
    9999999999
    col dr     
    heading 'PIO blks'         
    format   999,999,999
    col bg     
    heading 'LIOs'             
    format   999,999,999
    col sr     
    heading 'Sorts'            
    format  
    999,999
    col exe    
    heading 'Runs'             
    format   999,999,999
    col rp     
    heading 'Rows'             
    format 9,999,999,999
    col rpr    
    heading 'LIOs|per Row'     
    format   999,999,999
    col rpe    
    heading 'LIOs|per Run'     
    format   999,999,999
    col sqltxt    heading 'SQL Statement'  
    format A25 word_wrapped
    set pause
    on
    set pagesize  30
    set pause
    'More: '
    set linesize  120
    select  s.hash_value stmtid
    ,t.sql_text sqltxt
    ,sum(s.disk_reads) dr
    ,sum(s.buffer_gets) bg
    ,sum(s.rows_processed) rp
    ,sum(s.buffer_gets)/greatest(sum(s.rows_processed),1) rpr
    ,sum(s.executions) exe
    ,sum(s.buffer_gets)/greatest(sum(s.executions),1) rpe
    from v$sql s, v$sqltext t
    where s.command_type in ( 2,3,6,7 )
      and s.hash_value = t.hash_value
    group by s.hash_value, t.sql_text
    order by 5 desc

  • Query to get all the worksheets for a particular work book

    Hi All,
    I want to get all the associated worksheets for a particular workbook. What query will fetch mne those details. Also, where can find the EUL5 tables documentation
    Regards
    Thomas

    Hi Tamir,
    Thanks so far. I am yet to make the crucial breakthrough as far my application goes. Are you talking about the EUL5_QPP_STATS table? I tried retrieving worksheets even from that table also with the following query
    SELECT DISTINCT Eul5QppStats.QS_DOC_NAME,Eul5QppStats.QS_DOC_DETAILS
    FROM EUL5_QPP_STATS Eul5QppStats,EUL5_DOCUMENTS Eul5Documents
    WHERE Eul5QppStats.QS_DOC_NAME = Eul5Documents.DOC_NAME
    However, the worksheet data retrieved by Discoverer Oracle's product is not matching my dataset for every workbook. Please suggest.
    Reg
    Thomas

  • Query to get all records were AMNT1 AMNT2

    Hi,
    I have two fields Field1,Field2 and two Key figures-AMNT1,AMNT2. I want to get all the records for which AMNT1 > AMNT2.
    Any clues or solutions will be appreciated.
    Thanks
    Simmi

    Hi simmi
    You can put condition for this requirement in the query designer.
    When you are in the query designed have a formula with Boolean operation statement "is greater than", as shown.
    AMNT1>AMNT2
    now go to condition button and add one condition for this formula. the condition can be 'key figure'= formula name, Operator = 'Equal to' and value = '1'.
    Aply this condition and execute query with this condition active.
    regards
    rahul

  • Mysql query not getting all the results, works fine in php

    Hi All,
    I have a slightly big query which works fine in php getting 400 results but in java I get only 14 results when I traverse through resultset. Here is the query
    (select t1.to_uri as inv_to_uri, t1.sip_to as inv_sip_to, t1.sip_callid as inv_callid, t1.time as inv_time, t1.fromtag as inv_fromtag, t1.sip_status as inv_status, t2.to_uri as bye_to_uri, t2.sip_to as bye_sip_to, t2.sip_callid as bye_callid, t2.time as bye_time, t2.fromtag as bye_fromtag, t2.totag as bye_totag, t2.from_uri as bye_from_uri, t2.sip_from as bye_sip_from, sec_to_time(unix_timestamp(t2.time)-unix_timestamp(t1.time)) as length, ifnull(t1.time, t2.time) as ttime , 'outgoing' as call_type from acc t1 left outer join acc t2 on t1.sip_callid=t2.sip_callid and ((t1.totag=t2.totag and t1.fromtag=t2.fromtag) or (t1.totag=t2.fromtag and t1.fromtag=t2.totag)) and t2.sip_method='BYE' where t1.sip_method='INVITE' and (t1.username='manoj' and t1.domain='mantragroup.com') and t1.caller_deleted != '1' ) union (select t1.to_uri as inv_to_uri, t1.sip_to as inv_sip_to, t1.sip_callid as inv_callid, t1.time as inv_time, t1.fromtag as inv_fromtag, t1.sip_status as inv_status, t2.to_uri as bye_to_uri, t2.sip_to as bye_sip_to, t2.sip_callid as bye_callid, t2.time as bye_time, t2.fromtag as bye_fromtag, t2.totag as bye_totag, t2.from_uri as bye_from_uri, t2.sip_from as bye_sip_from, sec_to_time(unix_timestamp(t2.time)-unix_timestamp(t1.time)) as length, ifnull(t1.time, t2.time) as ttime , 'outgoing' as call_type from acc t1 right outer join acc t2 on t1.sip_callid=t2.sip_callid and ((t1.totag=t2.totag and t1.fromtag=t2.fromtag) or (t1.totag=t2.fromtag and t1.fromtag=t2.totag)) and t1.sip_method='INVITE' where t2.sip_method='BYE' and isnull(t1.username) and (t2.username='manoj' and t2.domain='mantragroup.com') and t2.callee_deleted != '1' ) order by ttime DESC limit 100,50
    Also this queru works fine on mysql console getting all 400 results. Please tell me what might be going wrong in Java.
    Thanks for your help and time,
    Manoj.

    How do you know you're doing the same query in PHP, MySQL, and the console?
    What's the code that's executing this?
    There's nothing intrinsically wrong with the query, although it's a bit messy - surely it could be simplified from that?
    Please format queries before posting in future. Also, did you really mean to let us know your company name and the name of a user? Seems a bit indiscrete.
         select
            t1.to_uri as inv_to_uri,
            t1.sip_to as inv_sip_to,
            t1.sip_callid as inv_callid,
            t1.time as inv_time,
            t1.fromtag as inv_fromtag,
            t1.sip_status as inv_status,
            t2.to_uri as bye_to_uri,
            t2.sip_to as bye_sip_to,
            t2.sip_callid as bye_callid,
            t2.time as bye_time,
            t2.fromtag as bye_fromtag,
            t2.totag as bye_totag,
            t2.from_uri as bye_from_uri,
            t2.sip_from as bye_sip_from,
            sec_to_time(unix_timestamp(t2.time)-unix_timestamp(t1.time)) as length,
            ifnull(t1.time, t2.time) as ttime ,
            'outgoing' as call_type
         from
            acc t1
         left outer join
            acc t2
         on
            t1.sip_callid=t2.sip_callid
         and
            (  (t1.totag=t2.totag and t1.fromtag=t2.fromtag)
            or (t1.totag=t2.fromtag and t1.fromtag=t2.totag))
         and
            t2.sip_method='BYE'
         where
            t1.sip_method='INVITE'
         and
            (t1.username='manoj' and t1.domain='mantragroup.com') and t1.caller_deleted != '1'
    union
         select
            t1.to_uri as inv_to_uri,
            t1.sip_to as inv_sip_to,
            t1.sip_callid as inv_callid,
            t1.time as inv_time,
            t1.fromtag as inv_fromtag,
            t1.sip_status as inv_status,
            t2.to_uri as bye_to_uri,
            t2.sip_to as bye_sip_to,
            t2.sip_callid as bye_callid,
            t2.time as bye_time,
            t2.fromtag as bye_fromtag,
            t2.totag as bye_totag,
            t2.from_uri as bye_from_uri,
            t2.sip_from as bye_sip_from,
            sec_to_time(unix_timestamp(t2.time)-unix_timestamp(t1.time)) as length,
            ifnull(t1.time, t2.time) as ttime ,
            'outgoing' as call_type
         from
            acc t1
         right outer join
            acc t2
         on
            t1.sip_callid=t2.sip_callid
         and
            (  (t1.totag=t2.totag and t1.fromtag=t2.fromtag)
            or (t1.totag=t2.fromtag and t1.fromtag=t2.totag))
         and
            t1.sip_method='INVITE'
         where
            t2.sip_method='BYE'
         and
            isnull(t1.username)
         and
            (t2.username='manoj' and t2.domain='mantragroup.com')
         and
            t2.callee_deleted != '1'
    order by ttime DESC limit 100,50

  • A query to get all sales processed in 2007 ?

    Hi All,
    I got a requirement from user saying
    " We have situations where "new" sales get processed against already existing or "old" sales orders. I need a query which shows all sales processed in year 2007 by sales order or whatever other identifier that is used"
    This is not making any sense to me. Can anyone help me with this ? Is there something to do with ship date or anything? Please let me know!!
    Thanks in advance
    Prathibha

    Hi Prathibha,
    The only idea that came to my mind is the following: your customer sends order in a regular interval (weekly, monthly…) under a number that represents an agreement between you and your customer.
    Under this scenario, you have one order created in the previous period from customer A that was partially shipped. In the current period, customer A sends a new order to you, but the quantity sent by your customer includes the balance. So, if new_quantity greater than old order balance, you will need to add an order with the balance.
    Still under this scenario, the report could all orders in OM posted/shipped in 2007 under this agreement.
    Just an idea, hope it helps,
    Ketter Ohnes

  • Is there any query to get all faulted instance Ids which should be recoverd

    Hi All,
    I am working on a production Environment. I have four managed servers. Since the integration involves invoking legacy systems we are encountering either the JCA error or siebel adapter error ... so we wanted to recover as soon as faulted.If i have one managed servers i can easily find out the faulted instances .. since it was having four managed servers and more than 25 soa projects ... difficult to track it .... i need to click on each of the managed servers and get the faulted instances and recover it ...
    Can we have a query which shows all faulted instances in managed servers so that i can go directly to COMPOSITE ID and recover it..instead of going to all the 25 soa managed projects...and recovering it.
    Thanks in Advance,
    Venugopal SSS Raja

    Hi Venu,
    If I can understand your use case correctly, you want to monitor the status of the WLS instances.
    If yes, then you can use WLST to connect to the server and fetch the status. You can change this script to fetch the information of all servers and display at once.
    There is an example given @ http://weblogic-wonders.com/weblogic/2011/03/16/weblogic-server-state-using-wlst/
    See if this helps.
    Thanks,
    Patrick

Maybe you are looking for

  • New to full edit, opening a RAW pic gives ERROR

    Going off of PSE8 book I am following directions to opening up a RAW picture in PSE8 and it says the file is either broken or cannot be included in the organizer. What should i look for?

  • Cloning VMs from a single VM which is Member of Domain

    Hello There, I have a VM which is got XenApp application server role and we have done lot of testing for each and every applicaiton which will be published through it, now this VM is completely ready. We would like to clone this VM and create multipl

  • Essbase DataExport to relational: where to define the dsn?

    I am running Essbase 11.1.1.2, and using DataExport in a calc to generate a flat file. Now I want to push the data into a relational table using: DATAEXPORT "DSN" "dsnName" "tableName" "userName" "password" What do I need to do to get the 'dsnName' r

  • New Infotype

    Hi gurus.... While creating New infotype...i am facing a problem.. after giving the required fields..and tyring to save it... 'm getting an error   """PACKAGE IN ORIGINAL SYSTEM IS MODIFIABLE WITH ORGANIZER TOOLS""" Plz throw some light on this issue

  • MSS to ESS migration

    Hi, We were using Leave Application in MSS mode where the Manager raises the leave on behalf of the employees and approves by himself. Now we have a requirement to migrate to ESS where the employee raises the request and it has to go to the manager f