Query to get Cust Number,Cust Name,Bill_to _address,Ship_to_address
Hello Friends,
I am new to oracle apps,i am facing difficult in writing the query to get the following information -
Cust Number,
Cust Name,
Bill_to _address,
Ship_to_address
Kindly share if you any information related to this.
Thanks in advance!
Ramya Nomula
Ramya
Use
select
a.party_name,b.account_number,
f.address1.......
from
hz_parties a, --get party name
hz_cust_accounts b, --get account number
hz_cust_acct_sites_all c, -- site information
hz_cust_site_uses_all d, --Site usage information 'BILL_TO' OR 'SHIP_TO'
hz_party_sites_all e, --to get to the address string
hz_locations f --address string is here
where
a.party_id=b.party_id
and b.cust_account_id=c.cust_account_id
and c.cust_acct_site_id=b.cust_acct_site_Id
and d.site_usage_code='BILL_TO'
and c.party_site_id=e.party_site_id
and e.location_id=f.location_id;
Play around with the above for status also so that you get to the exact query.
Thanks
Nagamohan
Similar Messages
-
How to get customer number and name from the SD document
Hi All,
Can you please let me know how to get Customer Number and Name from the SD Document?
Thanks a lot....
AnilHi,
It will be displayed in the SD (BIlling document) itself, you clikc on the VF03. The customer name and number will also appear in the SO document also Tcode VA03
regards,
radhika
Edited by: kolipara radhika on Jul 10, 2009 5:32 AM -
Query to get Week number Pls help
I need to get week number of the current year in the format 2008-W47 ( this is for sysdate
when i try
select to_CHAR(sysdate,'YYYY'||'-IW')
FROM DUAL
i get 2008-47
but in the format 2008-W47
Help
sSQL> select to_CHAR(sysdate,'YYYY')||'-W'||to_char(sysdate,'IW') from dual
2 /
TO_CHAR(
2008-W47 -
Applescript to get phone number from name
Hi, I am trying to make an applescript that will simply return a phone number from contacts when given a name. It is part of a larger script, but everything else is already working. It seems like it would be pretty simple, but nothing that I have tried will work.
Here is my best guess:
tell application "Contacts"
get phone of "John Doe"
end tell
I just need to set a variable to equal the phone number that is returned. Thanks in advance.Hello
You may try something like this.
set n to "John Doe"
tell application id "com.apple.AddressBook"
set p to value of phone 1 of (person 1 whose name = n)
set q to {label, value} of phones of (people whose name = n)
set r to value of phone 1 of (person 1 whose name = n) whose label = "home"
end tell
return {p, q, r}
Note that database may contain multiple records for the same person name and a person's record may contain multiple phone numbers.
Tested with AddressBook 5.0.3 under OS X 10.6.8.
Regards,
H -
How can I get current Number file name in a cell ?
I want to write current Number (3.5) file name in a cell.
It was working in previous version of Number but not with latest one. Thanks.Yes, you can click the title bar of any document (the down arrow) to access the current file name:
-
Get port number,host name,service name from database
Is there any way to know the host name,port number, sid and the service name of a particular instance from the database.
> Is there any way to know the host name,port number, sid and the service name
of a particular instance from the database.
Why?
The host name in the HOST_NAME column of V$INSTANCE for example, may not be the hostname/IP address that the local Listener listens for connections on. Or the Listener can listen on that host name/IP and several other local IP addresses.
The port number used for listening for connections by clients, are determined by the Listener's configuration.
Thus if you can explain the requirement for this info, maybe the forum can provide better and more specific answers. -
DESCRIBE TABLE or similar to get number and name of a table fields
Hi experts,
I want to use a sentence to get the number and name of the fields contained on a table or structure, and i cannot use DESCRIBE TABLE. I cannot find a way to get that info, does anybody know a sentence or method/funcion for this?
Thanks!!!
Artur.use this FM GET_COMPONENT_LIST.
can get list of fields also from variable which is not defined in DDIC. But has to be global.
Michal -
How to get the number of records of a streaming result set
Hi guys.
So if it wasn't a streaming result set, I would have done this:
{noformat}myResultSet<code class="jive-code jive-java">.last();
{color:navy}*int*{color} numResults = </code>myResultSet<code class="jive-code jive-java">.getRow();
</code>myResultSet<code class="jive-code jive-java">.beforeFirst();
</code>{noformat}
but being a streaming result set, beforeFirst() throws an exception...
So how do you get the number of records in that result set? I wanna avoid an extra count(*) query, so I would appreciate other solutions than that.JoachimSauer wrote:
vanwil wrote:
you see, for now I just use a count(*) query to get the number of records, but that's adding a lot of extra waiting time...Iterating over the result twice will surely be slower then doing the count(*).great! so what I got now is actually the fastest way there is... awesome...
If you get an exception, then you surely have a stack trace. That should tell you what happens, or at least where.com.mysql.jdbc.MysqlIO.checkForOutstandingStreamingData(MysqlIO.java:2066)
Why do you need to know the number of elements beforehand, anyway?I need to know the number of elements because the incoming data goes into a table. Now of course, I could use ArrayList<String[]> or something, but wouldn't that require more memory resources than Object[][] ?
No one can tell you that, at least not without more information (say, the stack trace for example).Here's the exception message:
java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@10c0ef2 is still active. Only one streaming result set may be open and in use per-connection. Ensure that you have called .close() on any active result sets before attempting more queries. -
TO_NUMBER getting invalid number error
I want to use TO_NUMBER function to converse some float number,
but the following query always gets invalid number error:
select to_number('12.1073') from dual;
but if I add the format in, it runs as expected:
select to_number('12.1073', '99.9999') from dual;
From the syntax, the format parameter is optional, is it only optional for integers?
Thanks!Same here.
So, or you replace dot by comma, or you change the territory (or nls_numeric_characters) defined for your session :
SQL> select to_number('12.1073') from dual;
select to_number('12.1073') from dual
ERROR at line 1:
ORA-01722: invalid number
Elapsed: 00:00:00.00
SQL> alter session set nls_territory='america';
Session altered.
Elapsed: 00:00:00.00
SQL> select to_number('12.1073') from dual;
TO_NUMBER('12.1073')
12.1073
Elapsed: 00:00:00.00
SQL> alter session set nls_territory='france';
Session altered.
Elapsed: 00:00:00.00
SQL> select to_number('12.1073') from dual;
select to_number('12.1073') from dual
ERROR at line 1:
ORA-01722: invalid number
Elapsed: 00:00:00.00
SQL> alter session set nls_numeric_characters='.,';
Session altered.
Elapsed: 00:00:00.00
SQL> select to_number('12.1073') from dual;
TO_NUMBER('12.1073')
12.1073
Elapsed: 00:00:00.00
SQL> Nicolas. -
Function Module to get pernr number based on first name and last name
Hi All,
What is the Function Module to get pernr number based on first name and last name.
Could you please help me.
T@R.
Vidyahi Vidya,
you can get perner from PA0002 based on firs name and last name.
use select query and get perner. -
Query to get batch GLBATCH name for the invoices of AP and AR
Please provide a query to get GLBatch name for an invoice of AR and AR.
From one cursor iam getting invoice number and invoiceID of AP and AR.
I have written query but it is taking much time
select distinct gjb.NAME
from gl_je_headers gjh,
gl_je_lines gjl,
gl_je_batches gjb
where gjl.REFERENCE_2=to_char(:p_invoiceid)
and gjh.JE_HEADER_ID=gjl.JE_HEADER_ID
and gjh.JE_BATCH_ID=gjb.JE_BATCH_ID
so iam getting performance problem.
Please suggest if iam wrong.
Waiting for your valuable suggestion.
Thanks
ganeshHi,
the version of Oracle E-Business Suite is R12
and ORacle Database IS 11I
Thanks & Regards
ganesh -
How to get row number in the fetch row itself in Sql Query ?
Hi,
i am fetching some rows from a sql query . Is there any way to get row number as well in each row while all rows are fetched ?
like this :
RowNum data1 data2
1 abc ere
2 bnh ioiHello
Ofcourse you can get the rownum inside a query, just keep in mind that the rownum is the number of order in which the records were fetched from the table, so if you do an order by, the rownum will not be sequential, unless you query the information in a subquery first.
SELECT rown, col1, col1
FROM table
Or
SELECT rownum, col1, col2
FROM (SELECT col_1, col_2 FROM table ORDER BY col1)
Regards
Johan -
Query to get file name of field
Hi folks,
I have one field in SQL table with whole file names:
e.g
C:\Directory1\File 1.txt
C:\Drirectory2\SubDirectory1\Image 33.jpg
I need one query to show only the file names:
e.g
File 1.txt
Image 33.jpg
What I need to do to get only the file names as result of query?create table test (filenames varchar(100))
insert into test values ('C:\Directory1\File 1.txt'),('C:\Drirectory2\SubDirectory1\Image 33.jpg'),('aaa'),(null)
select Reverse(stuff(reverse(filenames)
, Case when Charindex('\',reverse(filenames))>0 then Charindex('\',reverse(filenames)) else len(filenames) end
, Case when Charindex('\',reverse(filenames))>0 then len(filenames) else 0 End
,'')) fileCol from test
--Or
SELECT Distinct Coalesce(S.a.value('(/H/r)[4]', 'VARCHAR(100)'), S.a.value('(/H/r)[3]', 'VARCHAR(100)'), S.a.value('(/H/r)[2]', 'VARCHAR(100)'), S.a.value('(/H/r)[1]', 'VARCHAR(100)') ) AS fileCol
FROM
SELECT *,CAST (N'<H><r>' + REPLACE(filenames, '\', '</r><r>') + '</r></H>' AS XML) AS [vals]
FROM test) d
CROSS APPLY d.[vals].nodes('/H/r') S(a)
drop table test -
Getting PO number as file name when getting output as pdf file
Hi Experts,
Is there any possibility to get PO number into file name (instead of spool number) when getting output as pdf file.
Since I'm printing POs in batches (as pdf) it is too difficult to find exact PO among all the pdf files.
If PO number maintained as file name, would be great time saver for me.
Thanks
KamalHi,
Please check the below link..
Number ranges for Spool Requests
hope it may help you
Kuber -
Query to get the records with same last name
I need to write a single sql query to get all records with duplicate last_name's. For example, if tab1 has 4 records:
10 Amit Kumar
20 Kishore Kumar
30 Sachin Gupta
40 Peter Gabriel
then the query should return
10 Amit Kumar
20 Kishore Kumar
id, name,L_name being the 3 columns in table
Apprecite you help.
Thank you
MarySQL> create table mytable (id,name,l_name)
2 as
3 select 10, 'Amit', 'Kumar' from dual union all
4 select 20, 'Kishore', 'Kumar' from dual union all
5 select 30, 'Sachin', 'Gupta' from dual union all
6 select 40, 'Peter', 'Gabriel' from dual
7 /
Table created.
SQL> select id
2 , name
3 , l_name
4 from ( select t.*
5 , count(*) over (partition by l_name) cnt
6 from mytable t
7 )
8 where cnt > 1
9 /
ID NAME L_NAME
10 Amit Kumar
20 Kishore Kumar
2 rows selected.Regards,
Rob.
Maybe you are looking for
-
Report using GL Hierarchy directly from a cube in crystal reports
Hi, I am trying to build a crystal report showing GL account hierarchy ( a P n L report). When I am trying to source this field from the BW cube directly its not showing up on the report preview at all. I built something similar with hierarchy using
-
Transferring iTunes Library to External HD
Well, I got a new external hard drive for Christmas and decided it would be a good idea to transfer all of my iTunes stuff over there and use it as the default for purchased and imported music, videos, etc. I followed the instructions and everything
-
How do I clear out a "stuck" app update?
I installed a couple apps from my iTunes library. The app store showed them as needing to be updated, but they kept getting stuck (little circle stops spinning). Tried Xing them them out on the pane in iTunes that shows that screen on the iPad, but n
-
I synced my iPhone 4 and now I am stuck in recovery mode. iTunes does n
-
JSR168 portlet - How to acquire Portal user identity?
My scenario is: - Write a JSR168 portlet to access data in an Oracle database - The portlet will use the identity of a Oracle Portal user, who currently logs in, to create the connection to that database - In the database, I create a global role, tha