Query to get the customer's ship_to  Phone# and Fax#

Gurus -
Can anyone of you please help me in getting a query to shows the phoen and fax# of the Customer's ship_to Phone# and fax#
customers--> on Address tab ( click open) On next screen click on contacts tabe for SHIP_TO row , there under the communications section, there are telephone and fax details , i want to get those details.
Please help me in getting the query to get the fax and phone#.
Infact I am using the below query and still having issues getting the correct fax# ( using teh same logic for phone#)
select DISTINCT DECODE(PHONE_AREA_CODE,NULL,'',PHONE_AREA_CODE||'-')||PHONE_NUMBER
FROM hz_cust_accounts_all hca,
hz_parties hzp1,
hz_cust_acct_sites_all hcas,
hz_cust_site_uses_all hcsu,
hz_relationships hzr,
hz_org_contacts hoc,
hz_contact_points hcp,
hz_parties hzp,
hz_cust_accounts_all hca1,
hr_locations hrl
WHERE 1 = 1
AND hca.party_id = hzr.object_id
AND hzr.relationship_id = hoc.party_relationship_id
AND hoc.party_site_id = hcas.party_site_id
AND hcas.cust_acct_site_id = hcsu.cust_acct_site_id
AND hzr.party_id = hcp.owner_table_id
--AND hcp.primary_flag = 'Y'
AND hzr.subject_id = hzp.party_id
AND hzp.party_id = hca1.party_id(+)
AND hzp1.party_id(+) = hca.party_id
AND hcsu.location = hrl.location_id(+)
and hcsu.site_use_id = hsu.site_use_id
AND hcp.OWNER_TABLE_NAME IN ('HZ_PARTIES')
AND hcp.CONTACT_POINT_TYPE IN ('PHONE')
AND hcp.PHONE_LINE_TYPE = 'FAX'
AND hcp.STATUS = 'A'
and nvl (hcsu.status, 'x') = 'A'
AND hcsu.SITE_USE_CODE = 'SHIP_TO'
--and hcsu.site_use_id = hsu.site_use_id
-- and hcsu.cust_acct_site_id = hsu.cust_acct_site_id
--and hca1.cust_account_id = hca.cust_account_id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

What is the responsibility name? Form name and navigation path?
You can determine the query from the form itself as follows:
- Query the record(s)
- Click on Help > Diagnostics > Examine
- Under 'Block' field, select 'SYSTEM'
- Under 'Field' field, select 'LAST_QUERY'
You may also review the following note:
Note: 259722.1 - HOWTO Determine Table and Column Name from a field in a form in 11i
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=259722.1

Similar Messages

  • Query to get the Customer Contacts

    Hi all,
    Pls tell me the qyery to get the customer contacts like telephone number, fax number details.
    Thanks in advance

    What is the responsibility name? Form name and navigation path?
    You can determine the query from the form itself as follows:
    - Query the record(s)
    - Click on Help > Diagnostics > Examine
    - Under 'Block' field, select 'SYSTEM'
    - Under 'Field' field, select 'LAST_QUERY'
    You may also review the following note:
    Note: 259722.1 - HOWTO Determine Table and Column Name from a field in a form in 11i
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=259722.1

  • I have alot of music on my iphone 4 that i cant get on to my itunes account on the computer, when i sync the phone it doesn't transfer the music on to my computer. how can i get the music off my phone and into my itunes without it deleteing all my music?

    i put all my music on my iphone and then when i got my new computer and downloaded itunes, it wont let me transfer the music thats on to my phone.
    How do i get the music thats on my iphone on to my computer without it deleting everything?
    (please dont tell me to sync my phone or back it up as i already have and it hasnt tranfered my music).

    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • How do i get the musci off my phone and in my Itunes again.

    had to rebuild the computer lost all music. and want to get it off my phone back to itunes.
    how do i do this.??

    Do you not have a backup? Why not? *sigh*
    The only music that can be transfered from an iPhone to to iTunes is purchased music. Plug the iPhone into you Mac. Dismiss the alert asking if you want to sync. Right-click (Control+click) the iPhone in the Sources list and choose "Transfer purchases..."
    For the music not purchased from the iTunes Store, Google is your friend.

  • Join query to get the constraint type ,column type and table name

    Hi ,This is my query
    select
    table_name  , column_name  from user_cons_columns where table_name='EMP_CLASS'
    table_name     column_name
    emp_class        empno
    emp_class        deptno
    select constraint_type,table_name  from user_constraints where table_name='EMP_CLASS'
    constraint_type    table_name
    p                        emp_class
    u                        emp_class
    I need query for this out put combining above two query.
    constraint_type        column_name   table_name
    p                             empno            emp_class
    u                            deptno             emp_classThanks,
    Deekay.

    Hi,
    Try this:
    select a.table_name  , a.column_name ,b.constraint_type from user_cons_columns a, user_constraints b
    where a.table_name=b.table_name and a.table_name='EMP_CLASS'How about reading the JOIN documentation??
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/queries006.htm#SQLRF30046
    Cheers,
    Avinash

  • Query to get the Excise amount and basic amount based on the cst or vat tax

    Dear all,
                       I need a right query to get the basic amount ,excise amount and the tax amount based on the CST or VAT tax rate.The output should be like this,
    VAT
    goods excisabe at 1% - taxable amt(basic+excise for vat 1%)            tax amt
    goods excisable at 4%-   txable amt                                                       tax amt
    CST
    goods excisabe at 1% - taxable amt(basic+excise for CST 1%)            tax amt
    My problem will also be solved..if i am able to get  the basic value from base table OPCH itself............Since am using the PCH1 table to get the total basic amt...the values are duplicating.
    Regards,
    Shyam

    Hi Sowjanya,
    If you're simply trying to place a grand total, use the 'Insert Summary' option.
    Choose the measure field as the 'Field to Summarize' > Choose 'Sum' as the summary operation > Under 'Summary Location' choose 'Grand Total Report Footer'.
    -Abhilash

  • TS1702 it says that i have to pay again to download a game from itunes.. how can i get the game in my itunes and phone? do I accept the charges and it will be re-embersed? what should I do? I have the order confirmation number etc. if you need.

    it says that i have to pay again to download it from itunes.. how can i get the game in my itunes and phone? do I accept the charges and it will be re-embersed? what should I do? I have the order confirmation number etc.

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • I have just updated to Yosemite, but now I can't get the custom shortkeys to work. In Mavericks I had no problem whatsoever, but now even after googeling and restart no solution. Does anyone have the problem? All the other shortcuts work!

    I have just updated to Yosemite, but now I can't get the custom short-keys to work.
    In Mavericks I had no problem whatsoever, but now even after googeling and restart no solution.
    Does anyone have the problem? All the other shortcuts work!

    Hi Thomas,
    I can confirm the problem you are hitting. The XML test trace does not get recognized at all, and it defaults to Eclipse's basic Open File behaviour. I am not sure if it's because the format definition is missing, or if it's because something prevents the trace type from being recognized. I will open a bug about it.
    Thanks for identifying this issue!
    In the meantime, if you'd like to experiment with XML analyses, you can also take a look at the example at https://github.com/tracecompass/xml-analysis-example .
    Cheers,
    Alex

  • I have an iphone 4 for verizon and i am going to switch phones and get a droid motorolla 4g phone and the droid doesnt have a sim card. does my iphone 4 have a sim card that i can put in the droid? can i buy sim cards separately online for the droid?

    i have an iphone 4 for verizon and i am going to switch phones and get a droid motorolla 4g phone and the droid doesnt have a sim card. does my iphone 4 have a sim card that i can put in the droid? can i buy sim cards separately online for the droid?

    Brandon2184 wrote:
    The iPhone 4 uses a "Nano SIM"
    The CDMA iPhone 4 does not use a SIM at all. There is no SIM slot. It is a pure CDMA phone.

  • How to get the customized value of a Report portlet in a page

    Hi ,
    I have a report portlet and it has a bind variable which users can customize when added to a page. There is a link to a Form page in the report , to which I need to pass the value of bind variable customized by the user. I used :
    portal30.wwv_name_value.get_string( l_arg_names, l_arg_values, '<bind variable>');
    function, it works ok when we run the report alone .But when we add the report as a portlet in page , it does not return any value. How do I get the customized field value in a page.
    null

    SAN.
    I haven't tested but u can try with the below code...
    OATableBean tableBean = ...;
    OATableFooterBean tableFooterBean = tableBean.getFooter();
    if (tableFooterBean != null)
      OATotalRowBean totalRowBean = tableFooterBean.getTotal();
      totalRowBean.getValue("Re-Total");
    }Regards,
    Gyan

  • If i have an iPhone and an iPad on the same apple id, what do i do to NOT have my iPad get the imessages for my phone?

    If i have an iPhone and an iPad on the same apple id, what do i do to NOT have my iPad get the imessages for my phone?

    On the iPad:
    Settings > Messages > Send & Receive > Uncheck your phone number from both sections
    To turn it off completely:
    Settings > Messages > turn off iMessage

  • Query to get the data of all the columns in a table except any one column

    Can anyone please tell how to write a query to get the data of all the columns in a table except one particular column..
    For Example:
    Let us consider the EMP table.,
    From this table except the column comm all the remaining columns of the table should be listed
    For this we can write a query like this..
    Select empno, ename, job, mgr, sal, hiredate, deptno from emp;
    Just to avoid only one column, I mentioned all the remaining ( 7 ) columns of the table in the query..
    As the EMP table consists only 8 columns, it doesn't seem much difficult to mention all the columns in the query,
    but if a table have 100 columns in the table, then do we have to mention all the columns in the query..?
    Is there any other way of writing the query to get the required result..?
    Thanks..

    Your best best it to just list all the columns. Any other method will just cause more headaches and complicated code.
    If you really need to list all the columns for a table because you don't want to type them, just use something like...
    SQL> ed
    Wrote file afiedt.buf
      1  select trim(',' from sys_connect_by_path(column_name,',')) as columns
      2  from (select column_name, row_number() over (order by column_id) as column_id
      3        from user_tab_cols
      4        where column_name not in ('COMM')
      5        and   table_name = 'EMP'
      6       )
      7  where connect_by_isleaf = 1
      8  connect by column_id = prior column_id + 1
      9* start with column_id = 1
    SQL> /
    COLUMNS
    EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,DEPTNO
    SQL>

  • How to modify the query to get the output in a single row

    Hi All,
    Below is the query i have written it works fine
    select DISTINCT right(left(CTACCT,13),4) AS LocationNum,
    tODS_GLBalance.FiscalYearId AS FiscalYearId,
    tODS_GLBalance.FiscalMonthOfYearId AS FiscalMonthOfYearId,
    --tods_GLMetadata.Metric,
    Case when
    tods_GLMetadata.Metric = 'Gross Margin'
    Then SUM(Balance)
    Else 0
    END AS GrossMargin,
    Case when
    tods_GLMetadata.Metric = 'Occupancy'
    Then SUM(Balance)
    Else 0
    END AS Occupancy,
    Case when
    tods_GLMetadata.Metric = 'Payroll Dollars'
    Then SUM(Balance)
    Else 0
    END AS Payroll,
    Case when
    tods_GLMetadata.Metric = 'CF Sales'
    Then SUM(Balance)
    Else 0
    END AS OperatingSales,
    Case when
    tods_GLMetadata.Metric = 'Operations'
    Then SUM(Balance)
    Else 0
    END AS OperatingExpenses
    -- 0 as payroll
    from ods.[JJill].[tODS_GLBalance]
    inner join ods.Staging.tODS_INF_GLPCT ON tODS_GLBalance.PageNum = tODS_INF_GLPCT.CTPAGE
    inner join ods.JJill.tods_GLMetadata ON tods_GLMetadata.AcctDescription = tODS_INF_GLPCT.CTDESC
    where
    (tODS_GLBalance.FiscalYearId = 2012) and
    (tODS_GLBalance.FiscalMonthOfYearId = 2) and
    (right(left(CTACCT,13),4)= 3020)
    group by
    right(left(CTACCT,13),4),
    tODS_GLBalance.FiscalYearId,
    tODS_GLBalance.FiscalMonthOfYearId,
    tods_GLMetadata.Metric
    This is the sample output,
    LocationNum FiscalYearId FiscalMonthOfYearId GrossMargin Occupancy Payroll OperatingSales OperatingExpenses
    3020 2012 2 -112477.00 0.00 0.00 0.00 0.00
    3020 2012 2 0.00 0.00 0.00 -158288.94 0.00
    3020 2012 2 0.00 0.00 0.00 0.00 5625.44
    3020 2012 2 0.00 0.00 24185.79 0.00 0.00
    3020 2012 2 0.00 31075.53 0.00 0.00 0.00
    But, i am expecting the output to be something like this
    LocationNum FiscalYearId FiscalMonthOfYearId GrossMargin Occupancy Payroll OperatingSales OperatingExpenses
    3020 2012 2 -112477.00 31075.53 24185.79 -158288.94 5625.44
    Can someone please help me with changing my query to get the desired output?
    Please let me know if you have any questions.
    Thanks

    Try this:
    SELECT DISTINCT
    RIGHT(LEFT(CTACCT,13),4) AS LocationNum, tODS_GLBalance.FiscalYearId AS FiscalYearId, tODS_GLBalance.FiscalMonthOfYearId AS FiscalMonthOfYearId,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Gross Margin' THEN Balance ELSE 0 END ) AS GrossMargin,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Occupancy' THEN Balance ELSE 0 END ) AS Occupancy,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Payroll Dollars' THEN Balance ELSE 0 END ) AS Payroll,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'CF Sales' THEN Balance ELSE 0 END ) AS OperatingSales,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Operations' THEN Balance ELSE 0 END ) AS OperatingExpenses
    FROM ods.[JJill].[tODS_GLBalance]
    INNER JOIN ods.Staging.tODS_INF_GLPCT
    ON tODS_GLBalance.PageNum = tODS_INF_GLPCT.CTPAGE
    INNER JOIN ods.JJill.tods_GLMetadata
    ON tods_GLMetadata.AcctDescription = tODS_INF_GLPCT.CTDESC
    WHERE tODS_GLBalance.FiscalYearId = 2012
    AND tODS_GLBalance.FiscalMonthOfYearId = 2
    AND RIGHT(LEFT(CTACCT,13),4) = 3020
    GROUP BY right(left(CTACCT,13),4), tODS_GLBalance.FiscalYearId, tODS_GLBalance.FiscalMonthOfYearId, tods_GLMetadata.Metric

  • I downloaded an app off the store which said it was free and part of the 5 year promotion. I've been charged for the app by the store. I don't want the app and there's no one to speak to about it. Who can I call and how can I get the app off my phone?

    I downloaded an app off the store which said it was free and part of the 5 year promotion.
    I've been charged for the app by the store. I don't want the app and there's no one to speak to about it.
    Who can I call?
    How can I get the app off my phone?
    How do I get my money back from something I wouldn't have ordered?

    You cannot call anyone.  You contact them as everyone else does:  http://www.apple.com/support/itunes/contact/
    You delete the app as you do any other app.  Hold an icon until they wiggle.  Tap the "x".  This is covered in the manual.

  • When I send a text message to someone I am also getting the text to my phone. How can I stop this?

    When I send a text message to someone I am also getting the text to my phone. How can I stop this?

    Go to Settings > Messages > Send & Receive and make sure only the phone number is checked.

Maybe you are looking for

  • Smart Playlists Sync from Itunes

    Hey all, Whenever I connect my iphone 4 to my macbook all of the smart playlists automatically sync to my iphone, even though i have "manage music manually" selected under my iphone settings. Anyone know how i stop these playlsits from syncing to my

  • How can I control the windows behavior when the user hits "Windows key +d"?

    Hi, I have an application with 2 top-level windows. Both windows may be open at the same time. One window is a win32 window, and the other is a wpf window. When both windows are open, the wpf window should always be before the win32 window. When the

  • Thread refuses to work

    Ok, this is the weirdest thing ever happened to me ever since i started working with cellphone programming. Lately, one of my thread refuses to activate. I have this thread that communicates with a thermal printer to print something right. Well, i ha

  • OWB R2 / Paris: importing source metadata (tables) results in LONG error

    Hello, Ik hope anyone knows a solution to this, as I can't find anything on OTN, Metalink and google... When I create a new module to function as 'source' for my datawarehouse I try to import the table definitions from this schema using the import wi

  • MacBook not working when modified from stock config

    I have an Aluminum MacBook that came with 2 gigs of ram and a 250 gig hard drive. When trying to upgrade either the ram or the hard drive, the machine has problems booting and regardless of what I try, it will not accept Snow Leopard. SL will install