Need a Query to find Unassigned Price Lists
Hi
I need a query which will show any Price List NOT assigned to a Business Partner. I have the following:
SELECT T0.[ListNum], T0.{ListName] From OPLN T0
WHERE T0.[ListNum} NOT IN T1.[ListNum[ from OCRD T1
Haven't worked that much with NOT IN statement.
Thank you!
Hi Daniel,
Please check below Query.
SELECT T0.[ListNum], T0.[ListName] From OPLN T0 WHERE T0.[ListNum] NOT IN ( SELECT DISTINCT T1.[ListNum] FROM OCRD T1 )
Hope this help
Regards::::
Atul Chakraborty
Similar Messages
-
Query to find out the list of user who have delete access
Hi,
I need a query to find out the list of users who have delete access on perticular folder/universe/ reports in infoview.
Please advice.
Regards,
Neo.orton607 wrote:
thanks for replying guys. But the thing is i am using dynamic sql execute immediate in my package, so i want those tables also and the schema name.
thanks,
ortonThis is not possible. The best you could do is to have a good guess.
Or how would you parse some dynamic statement as this:
v_suffix := 'loyees';
v_sql := 'Select count(*) from (select ''nonsense'' col1 from emp'||v_suffix||') where col1 = ''Y'''';
execute_immediate(v_sql);
...What is the table name? How do you want to parse that?
Better rewrite all dynamic SQL statements into non dynamic ones. Or do the source control logic for those dynamic parts in an extra module. For example implement your own dependency table and force every developer to add there all dynamic parts. -
Need a query to find Grops mapped on Folders
Hi ,
I need a query builder query to find out the list of folder and mapped groups to those folder.
Would you please let me know if that is possible I triead but no luck .
Regards,
NeoHi,
This query sound goods but I get error
Select SI_NAME, SI_KIND From CI_APPOBJECTS, CI_INFOOBJECTS
Where PARENTS("SI_NAME='Myfolder'",'CHILDREN(''SI_NAME=''UserGroup''')")
Please let me know if I am giong in right direction becuse I never used Parents and child concept bit confused.
All I need is when I put in my folder name it has to show me all the groups mapped to it.
If this query gives the result , it will be the great logic I would say
Thanks a ot.
Neo A -
Where can I find the price list?
I would like to implement BeeHiv locally in our company, does anyone know where to find the price list and annual support fee?
Thankshttp://www.oracle.com/us/corporate/pricing/price-lists/index.html
-
Where do I find the price list for adobe products
where do I find the price list for adobe products
Hi mikekuszla
Which Product you want to purchase or Looking for ? -
Hi All,
I have a query that does a lookup on inventory and returns useful info as onhand, committed, warehouse,
various price list data etc. It is very useful for our telephone sales guys as they can see all the information
they need in one quick search. There is a wildcard variable that searches both the ItemCode and ItemName
fields to return possible results.
I would like to add one further column to this query.. being the ETA (DocDueDate) of the most recent Open
AP purchase order that relates to the Item.. if any. I want to return the rest of the result even if there is no
AP Purchase Order open.
I have posted two queries below. The first is the original query that works well. It offers wildcard search
of the ItemCode and ItemName, but does not give me the ETA (DocDueDate) of any open AP Purchase
orders for the item (what I want).
The second query does give me everything thing I want returned, but only if I enter the exact ItemCode
into the variable field. I can no longer do the wildcard search that I also want. Some of our codes are simply
not practical to remember, and cannot be easily identified. this is why I need the wildcard search to look in
both the Item and Name column and return possible matches.
I have both queries below.
This is the working original query...
SELECT
T0.[ItemCode],
T0.[ItemName],
CAST (T0.[OnHand] As INT) As ' Total On Hand',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=01) As INT) As 'Melb Whse',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=06) As INT) As 'Demo Whse',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=04) As INT) As 'Bill Car Stock',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=05) As INT) As 'Brett Car Stock',
CAST (T0.[IsCommited] As INT) As 'Committed',
CAST (T0.[OnOrder] As INT) As 'On Order',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=6) as 'RRP Inc GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=1) as 'RRP Ex GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=2) as 'Comp Ex GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=3) as 'Std Ex GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=4) as 'Pro Ex GST',
T1.[ItmsGrpNam],
T2.[FirmName]
FROM OITM T0 INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
INNER JOIN OMRC T2 ON T0.FirmCode = T2.FirmCode
WHERE T0.[ItemCode] Like '%%[%0]%%' OR T0.[ItemName] Like '%%[%0]%%'
ORDER by T0.[ItemCode]
For Browse
This is the new query with the AP PO DocDueDate lookup included. (Wildcard searches dont work anymore)
SELECT
T0.[ItemCode],
T0.[ItemName],
CAST (T0.[OnHand] As INT) As ' Total On Hand',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=01) As INT) As 'Melb Whse',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=06) As INT) As 'Demo Whse',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=04) As INT) As 'Bill Car Stock',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode=05) As INT) As 'Brett Car Stock',
CAST (T0.[IsCommited] As INT) As 'Committed', CAST (T0.[OnOrder] As INT) As 'On Order',
(SELECT TOP 1 T0.[DocDueDate] FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry
WHERE T1.[ItemCode] = [%0] And T0.[DocStatus] ='O' ORDER BY T0.[DocDate] Asc) As 'ETA',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=6) as 'RRP Inc GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=1) as 'RRP Ex GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=2) as 'Comp Ex GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=3) as 'Std Ex GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=4) as 'Pro Ex GST',
T1.[ItmsGrpNam],
T2.[FirmName]
FROM OITM T0 INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
INNER JOIN OMRC T2 ON T0.FirmCode = T2.FirmCode
WHERE T0.[ItemCode] Like '%%[%0]%%' OR T0.[ItemName] Like '%%[%0]%%'
ORDER by T0.[ItemCode]
For Browse
As you can see in query 2, I used the same variable to attempt to lookup the DocDueDate from OPOR.
This only works if I enter the variable exactly as ItemCode. No longer wildcard search.
if anyone could offer any assistance it would be most appreciated.
Best regards,
JohnHi István,
Thanks! That works great.
The only additional thing I need is to return the DocNum of the Purchase order (DocNum from OPOR). I attempted to do this by adding T.[DocNum] to your suggested query as per below... however it returns error "Only one expression can be specified in the select list when the subquery is not introduced wit EXISTS"
SELECT
T0.[ItemCode],
T0.[ItemName],
CAST (T0.[OnHand] As INT) As ' Total On Hand',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='01') As INT) As 'Melb Whse',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='06') As INT) As 'Demo Whse',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='04') As INT) As 'Bill Car Stock',
CAST ((SELECT OnHand from OITW where ItemCode=t0.ItemCode and WhsCode='05') As INT) As 'Brett Car Stock',
CAST (T0.[IsCommited] As INT) As 'Committed', CAST (T0.[OnOrder] As INT) As 'On Order',
(SELECT TOP 1 T.[DocNum], T.[DocDueDate] FROM OPOR T INNER JOIN POR1 Tt ON T.DocEntry = Tt.DocEntry
WHERE Tt.[ItemCode]=T0.ItemCode And T.[DocStatus] ='O' ORDER BY T.[DocDate] Asc) As 'ETA',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=6) as 'RRP Inc GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=1) as 'RRP Ex GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=2) as 'Comp Ex GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=3) as 'Std Ex GST',
(SELECT price from ITM1 where ItemCode=t0.ItemCode and PriceList=4) as 'Pro Ex GST',
T1.[ItmsGrpNam],
T2.[FirmName]
FROM OITM T0 INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
INNER JOIN OMRC T2 ON T0.FirmCode = T2.FirmCode
WHERE T0.[ItemCode] Like '%%[%0]%%' OR T0.[ItemName] Like '%%[%0]%%'
ORDER by T0.[ItemCode]
For Browse
Any ideas?
Many thanks,
John -
Query to find out the list of tables used in a package
hello,
can anyone please help me out with a query; i want to find out the list of tables used by a particular package.
thanks,
ortonorton607 wrote:
thanks for replying guys. But the thing is i am using dynamic sql execute immediate in my package, so i want those tables also and the schema name.
thanks,
ortonThis is not possible. The best you could do is to have a good guess.
Or how would you parse some dynamic statement as this:
v_suffix := 'loyees';
v_sql := 'Select count(*) from (select ''nonsense'' col1 from emp'||v_suffix||') where col1 = ''Y'''';
execute_immediate(v_sql);
...What is the table name? How do you want to parse that?
Better rewrite all dynamic SQL statements into non dynamic ones. Or do the source control logic for those dynamic parts in an extra module. For example implement your own dependency table and force every developer to add there all dynamic parts. -
Need MDX query to find something like date diff and Date Range for last 10 days
Hi ,
I need two Query .First Query for below;
I have below data in table like.
Cat StartDate EndDate
A 2000-01-01 2000-01-15
B 2000-01-02 2000-01-30
C 2000-01-01 2000-01-31
D 2000-02-01 2000-02-28
A 2000-01-10 2000-01-31
I need if Startdate and Date completes whole one month then set status =1 else 0 using MDX query.
like this ;
Cat StartDate EndDate Status
A 2000-01-01 2000-01-15 1
B 2000-01-02 2000-01-30 0
C 2000-01-01 2000-01-31 1
D 2000-02-01 2000-02-28 1
A 2000-01-10 2000-01-31 1
In second query I need last 10 days from current days like;
Now = 8/20/2014
output will be ;
8/20/2014
8/19/2014
8/18/2014
8/17/2014
8/16/2014
8/15/2014
8/14/2014
8/13/2014
8/12/2014
8/11/2014
8/10/2014
Please help me .
ThanksHi Prajapati,
In your scenario, you can use Properties and Datediff function to achieve your requirement. Since not know the structure of your cube, we cannot give you the esact query.
I have tested it on the AdventureWorks cube, the query below is for you reference.
WITH MEMBER [Measures].[StartDate]
AS
[Employee].[Employee Department].CURRENTMEMBER.PROPERTIES('Start Date')
MEMBER [Measures].[WorkYear]
AS
DATEDIFF('yyyy',[Measures].[StartDate],NOW())
MEMBER [Measures].[Status]
AS
IIF(DATEDIFF('yyyy',[Measures].[StartDate],NOW())>10,1,0)
SELECT {[Measures].[StartDate],[Measures].[WorkYear],[Measures].[Status]} ON 0,
[Employee].[Employee Department].[Employee].MEMBERS ON 1
FROM [Adventure Works]
Results
Reference
http://msdn.microsoft.com/en-us/library/ms144821.aspx
Regards,
Charlie Liao
TechNet Community Support -
Need sql query to find out same item is used in open po and closed po
Hi Experts,
I have an requirement is that, i need to find out the item is used in open po and closed po.
example: A is the item is used in closed PO and Open PO.
i need to write down the scripts how many same items is used in open po and closed po.
if any sql script is there please share.
Please let us know if any concerns.
Thanks
bmnHi
Please try below query
select
distinct c.segment1
from
po_lines_all a,
po_line_locations_all b,
mtl_system_items_b c
where
a.po_line_id= b.po_line_id
and a.item_id=c.inventory_item_id
and b.closed_code='OPEN'
and a.item_id in ( select
item_id
from
po_lines_all d,
po_line_locations_all e,
mtl_system_items_b f
where
d.po_line_id= e.po_line_id
and d.item_id=f.inventory_item_id
and e.closed_code in ('CLOSED','FINALLY CLOSED','CLOSED FOR INVOICE','CLOSED FOR RECEIVING')); -
Need a Query to find whether the database needs any media recovery...
Hi,
I am at the mount stage of a database and yet be opened.at this stage any Query is available or any other way is there to find whether the database needs any media recovery or Instance recovery..?
my objective is before opening the database i need to make sure it is consistent or inconsistent and any form of recovery is needed..
thanks ®ards,
Ragunath
Edited by: ragu.dba.in on Mar 6, 2013 12:57 AMHi Ragunath,
Use these queries , SCN should be consistent .. no fuzzy files, check for recovery of files in v$recover_file .. pass sufficient archives & fulfill the checks before open reset-logs
set line 900
set pages 900
set echo on
alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
set numwidth 13
col CHECKPOINT_CHANGE# for 9999999999999999
col CHANGE# for 9999999999999999
column error format a10
column member format a60
show parameter db_recover
select * from v$recover_file;
select file#, status from v$datafile;
select file#, checkpoint_change#, checkpoint_time, error from v$datafile_header;
select distinct status from v$backup;
select distinct checkpoint_change# from v$datafile_header;
select hxfil file_id, fhscn scn, fhthr thread, fhrba_seq sequence, fhsta status from x$kcvfh;
select distinct fhscn from x$kcvfh;
select hxfil file_id, fhtnm tablespace_name from x$kcvfh;
##### Fuzzy Check ####
alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS';
set feedback on
set heading on
set pagesize 1000
set linesize 175
column checkpoint_change# format 999999999999999999999
select status, checkpoint_change#, fuzzy,
to_char(checkpoint_time, 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time,
count(*)
from v$datafile_header
group by status, checkpoint_change#, fuzzy, checkpoint_time
order by status, checkpoint_change#, fuzzy, checkpoint_time;Thanks,
Ajay More
http://www.moreajays.com -
Need sql query to find out Joins attached with folders in Discoverer
Hi,
Can anyone let me know the sql query which can be used to identify the joins which are attached to the folders.
Actually we have to identify all the joins conditions from folders those are migrated from one instance to others.
Thanks
abhishekI recommend that you implement the admin EUL supplied by oracle, you can get there a lot of repository information (metalink note: 556932.1).
Try to use this (maybe you will need some pkg's):
SELECT
DECODE(KEYS.FK_MANDATORY,
1,
'Always exist in master folder',
'Might not exist in master folder') "Detail Item values",
EUL10G_US.EUL5_GET_JOIN(EXP.EXP_ID, 'N') "Join Master --> Detail",
KEYS.KEY_DESCRIPTION JOIN_DESCRIPTION,
KEYS.KEY_DEVELOPER_KEY JOIN_IDENTIFIER,
KEYS.KEY_NAME JOIN_NAME,
DECODE(SUBSTR(KEYS.KEY_NAME, 1, 19),
'AUTO_GENERATED_NAME',
'Yes',
'No') "AutoGen",
DECODE(DECODE(SUBSTR(KEYS.KEY_NAME, 1, 19),
'AUTO_GENERATED_NAME',
'Yes',
'No') ,
'Yes',
EUL10G_US.EUL5_GET_JOIN(EXP.EXP_ID),
KEYS.KEY_NAME) "Actual Join Name",
KEYS.KEY_UPDATED_DATE JOIN_LAST_UPDATE,
DECODE(KEYS.FK_ONE_TO_ONE, 1, 'One to one join', NULL) "One to One join",
DECODE(KEYS.FK_MSTR_NO_DETAIL,
1,
'Outer join on detail' || CHR(10),
NULL) "Outer Join on Detail",
DECODE(KEYS.FK_DTL_NO_MASTER,
1,
'Outer join on master' || CHR(10),
NULL) "Outer Join on Master",
DECODE(KEYS.FK_MSTR_NO_DETAIL,
1,
'Outer join on detail' || CHR(10),
NULL) || DECODE(KEYS.FK_DTL_NO_MASTER,
1,
'Outer join on master' || CHR(10),
NULL) ||
DECODE(KEYS.FK_ONE_TO_ONE, 1, 'One to one join', NULL) "Optional Join Configurations",
OBJ.OBJ_NAME "MASTER_FOLDER",
OBJ_DETAIL.OBJ_NAME "DETAIL_FOLDER"
FROM EUL10G_US.EUL5_OBJS OBJ,
EUL10G_US.EUL5_EXPRESSIONS EXP,
EUL10G_US.EUL5_KEY_CONS KEYS,
EUL10G_US.EUL5_OBJS OBJ_DETAIL
WHERE ((KEYS.KEY_ID = EXP.JP_KEY_ID) AND
(OBJ.OBJ_ID = KEYS.FK_OBJ_ID_REMOTE) AND
(OBJ_DETAIL.OBJ_ID = keys.KEY_OBJ_ID)); -
Need sql query to find out Joins attached with folders
Hi,
Can anyone let me know the sql query which can be used to identify the joins which are attached to the folders.
We dont want to see those from front end(disc admin).
Thanks
abhishekabhishek - This is the Application Express forum. I have no idea what you are asking but it may need to be directed to a different forum.
Scott -
Need sql query to find ten records in sequential manner
Plz help me
I need to have ten records on my page. at the bottom of the page, i want to dispaly the number of pages that have records , just as a google page shows at the bottom. if the moves user moves to the next page , the next ten records must be displayed. suppose the user selects and clicks 5th page then the records on that page are displayed.How can i write the sql query corresponding to this specificationi don't want all records to be fetched at the same time and put on the server, rather whenever the page is opened , the corresponding records are fetched and displayedHi
Maybe you should use a CachedRowSet.
Look this:
http://developer.java.sun.com/developer/technicalArticles/javaserverpages/cachedrowset/
This page has a example that will help you. -
I have 5 columns in a table and these columns have newline characters data( either chr(10) or chr(13)).
Now I need to fetch data so that all the records which have new line character( either chr(10) or chr(13) ) in any of these 5 columns should be retrieved.
Please help me with a correct query for this task.
Edited by: nav on Jun 2, 2011 10:21 PMAn example .. you can do it for all 5 columns adding "OR" conditions
with t as
(select 'Arun'||chr(10) a, 'Gupta'||chr(13) b from dual union all
select 'Dinesh'||chr(10) a, 'Kumar'||chr(13) b from dual union all
select 'Naresh'||chr(10) a, 'Raja' b from dual union all
select 'Harish' a, 'Mahesh' b from dual union all
select 'Jatin'||CHR(13) a, 'Mahesh' b from dual
select * from t
where a like '%'||CHR(10)
or a like '%'||CHR(13)
or b like '%'||CHR(10)
or b like '%'||CHR(13) Regards
Arun -
Need a query to find Table Dependancy
Hi Experts,
I am in a need to find out which are all tables refer to particular table 'ABC' and / or it's column 'column_1', since I am new to environment and have about 500 + tables.
Please tell me what are the various ways, I can achieve above requirement?
Regards,
MSuser_cons_columns
Information about accessible columns in constraint definitions
OWNER
Owner of the constraint definition
CONSTRAINT_NAME
Name associated with the constraint definition
TABLE_NAME
Name associated with table with constraint definition
COLUMN_NAME
Name associated with column or attribute of object column specified in the constraint definition
POSITION
Original position of column or attribute in definition
Also try this, DBMS_METADATA
set long 9999
select dbms_metadata.get_ddl('TABLE','ABC') FROM DUAL;
Edited by: rajeysh on Jun 21, 2011 2:44 AM
Edited by: rajeysh on Jun 21, 2011 2:44 AM
Maybe you are looking for
-
Unable to install Adobe Photoshop Elements on Windows XP
Adobe Photoshop Elements disc came with my Olympus camera but never installed on my computor. I tried to install it but it will not accept the numbers on the disc. Are these the numbers they are asking for? I cannot find any other numbers.
-
Images enlarge and movies play in iweb, but not when published
Everything works fine in the program, but when published to site or folder, photos are there, but won't enlarge. The movie thumbnail shows with the little movie icon in the corner, but clicking does nothing.
-
New iPad does not display sent messages
i set up the mail, send mial happily. but when i go to sent mail folder, it displays sent e-mails form last year, and all the wya back to 2011, but not the ones i sent this week since getting the new iPad. anybody have any ideas?
-
My firefox browser won`t open,,, i get a message that says "appication failed to start because plc4.dll was not found"... Does anyone know whats wrong??? Thanks
-
Does anyone know when the tolerance field is used with Oracle Spatial? - Is it used when creating indexes? If I change a tolerance value do I need to recreate the index? - Is it used within the RELATE operators or other operators where tolerance is n