Two LOV queries in one item... is it possible??
Hi,
I have created a list of value in DML form as below-
select pcrs.cost_record_status, pcrs.port_cost_record_status_id
from ptcs_cost_record_status pcrs
But, depends on "pcrs.port_cost_record_status_id" I only want certain values to show on the list.
For example:
--if pcrs.port_cost_record_status_id is 2
--then show status 2,3,4
select pcrs.cost_record_status, pcrs.port_cost_record_status_id
from ptcs_cost_record_status pcrs
where pcrs.port_cost_record_status_id in (2,3,4)
--if status id is 1
--then show status 1,5
select pcrs.cost_record_status, pcrs.port_cost_record_status_id
from ptcs_cost_record_status pcrs
where pcrs.port_cost_record_status_id in (1,5)
Any ideas on how I can have two different LOV in one item?
Thank you!!
Ling
LC wrote:
Hi,
port_cost_record_status_id is an ITEM and it will be retrieved from database when the form is opened.It doesn't look like one (the convention being that page items are prefixed with their page number, and referenced as bind variables using ":").
With respect to the original question above, the LOV query is:
select pcrs.cost_record_status, pcrs.port_cost_record_status_id
from ptcs_cost_record_status pcrs
where pcrs.port_cost_record_status_id in (2,3,4)
and :p1_port_cost_record_status_id = 2
union all
select pcrs.cost_record_status, pcrs.port_cost_record_status_id
from ptcs_cost_record_status pcrs
where pcrs.port_cost_record_status_id in (1,5)
and :p1_port_cost_record_status_id = 1
Similar Messages
-
Import Two Price Lists for one item
Hi all,
How we can import two price lits for one item and how to link it.
For eg.
Suppose Item A is having price 100 Rs today at 11 am
and its price changes to 150 RS at 1 Pm.
how we can do this.
We also want to see the last price of that item.
Reply
Thanks,
NeetuNeetu,
What do you mean by changing? Does the Item price flactuate throughout the day every day..if so you need to create a routine to import/update the pricelist constantly.
If the 11 am and 1 pm are constant times when the prices change then you can maintain a pricelist for each one of them.
Shooting for a solution without knowing the business background can be a bit wasteful. If you might want to throw some light on the type of business and what the prices are for..
I also see you have posted the same question earlier..Price Updation
I would suggest that you post only one thread for one question. -
Two Bex Queries in one web template - drill-down should affect both queries
Hi,
I would like to have two Bex Queries in one web template with the same selection screen and free characteristics. When drilling-down on characteristics I want both queries to break down the figures. I cannot get the last part to work. We are using version 7.0.
Any ideas how to make this work?
BR,
TobiasHi,
Refer these links it may be usefulin you case.
WAD Pdf
http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/749a4622-0a01-0010-36bf-b6b30a2a3a22
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/301db65c-f221-2c10-a9a1-f2236e3cea2c -
Two separate queries in one report
Hi Gurus,
Is it possible to make two separate queries in the same worksheet (I need to have a column in my report from a different query from this report). As we can have more than one query in Oracle Reports, similarly, is it possible to have more than one query in Oracle Discoverer Report.
Thanks,
PoojaThe functionality your looking for is not available in Discoverer today. You can have two separate worksheets within Discoverer, one to run each query. Another option is only available in Discoverer Desktop, it is called a subquery which allows you to run one query and then pass the results as a parameter into your workbook. However, I don't believe either of those options resolve the problem your looking to solve.
Matt Topper
TUSC, The Oracle Experts
[email protected] -
Adding values from two different queries in one query
Hi,
I have developed a web template by combining 3 queries ,which were created from the same MultiProvider.These queries are having many different selections .Now I need to get the addition of values from these 2 queries into third query.
Is there any way to combine the selections from these queries into one instead of recreating them again.I tried to use global strucuture but not successful.
Kindly let me know is there any workaround for this.
Thanks & Regards,
RajaHi ,
You can do it by excel formula.
sheet 1 --> 1st query
sheet2 -->2nd query
sheet3--> put calculations accroding to your requirement based on sheet1 & sheet2 into sheet3.
Regards
Pcrao. -
Two select commands in one item doesn't work?
I've created an item in a region which contains one select sentence which goes like:
select sum(r.amount * price.prices * re.sats * ac.sats)
from registration r, pricetype price, ressoucecostdriver re, activitycostdriver ac
where
r.art_art_id = price.art_art_id
and r.activity_activity_id = 42
and re.ressourcecostdriver_id = 47
and ac.activitycostdriver_id = 53;
to that sentence I need to add the following select sentence as a sum of this one and the previous select sentence
select sum(r.amount * price.prices)
from registration r, pricetype price
where
r.art_art_id = price.art_art_id
and r.activity_activity_id = 22
So what I really need is the sum (sum(r.amount * price.prices) + sum(r.amount * price.prices * re.sats * ac.sats)) so to say, but without the where sentences is the same.
I've tried to "rename" the last select sentence to somthing like
select sum(rr.amount * priceprice.prices) to avoid the where constraints to apply for both of the select sentences, but that doesn't work apparently.
Can anyone help me?Morten,
If you look closely at the query I posted for you, I have used WITH statements to encompass each of your two queries, I then (in the last line) perform a simple select from those queries, you could simply add the two values together there if you like.
For example -
jes@TESTDB> with tab1 as (select 1 as num1 from dual),
2 tab2 as (select 2 as num2 from dual)
3* select num1, num2, (num1+num2) as num3 from tab1, tab2
NUM1 NUM2 NUM3
1 2 3
jes@TESTDB> with tab1 as (select 1 as num1 from dual),
2 tab2 as (select 2 as num2 from dual)
3* select (num1+num2) as num3 from tab1, tab2
NUM3
3 -
Two Mac computer in one Time Machine ? Possible?
Hi
Does anyone know that can I back up two computers in one Time Machine External HD? I have one Imac (PPC) and one MAcbook (intel). For both of them I'd like to make one Time machine HD. Does it work like that or do I need to back up two seperate TM HD for each of my computers?
Many thanks...tur,
There are multiple options for backing up 2 machines to one external drive. Remember that Time Machine is smart enough to recognize different machines and stores the backups in different folders.
1: Connect your external drive to your main machine and then use Personal File Sharing to share that drive on your network. Keep in mind sharing the drive over the network will degrade network speed while Time Machine is working (Not such a big deal if you use a wired network).
2: (The option I use) Run Time Machine on the first computer, eject it the drive, and then plug it onto the second machine and run time machine on that computer.
I use option 2 because I have a machine I use as a media center and do not need regular backups of. I only back it up when I add files.
A third option I have not had any experience with is using Apple's new Time Capsule.
I hope this answers your question. -
Two queries in one report?
I have Three tables like
Device_table columns are
d_id, d_name, date
Software_table
sw_id, software, version, serial_no, sw_type, d_id(foreign_key)
hardware_table
hw_id, hardware, specification, d_id(foriegn_key)
now in reports i want to attach both hardware and software, I have made two quires like
SELECT d.d_name, sw.software, sw.version, sw.sw_type from
device_table d, software_table sw
where d.d_id = sw.d_id
and second query is
SELECT d.d_name, hw.hardware, hw.specification
from device_table d, hardware_table hw
where d.d_id = hw.d_id
Now my problem is that how can I add both queries in one report so that i can get a list of software and hardware attached to one device.
Regards
MazI want to see the report as follow.
d_name: CPU-1
date: -----------
Software installed:
sw_id, software, version, serial_no, sw_type
(list of softwares attached, can be more then one)
Hardware attached:
hw_id, hardware, specification (same like software list, it will contain hardware list attached to specific device),
Please if you can help me that how will i make a query for this.
Thanks and Regards
Maz -
How to Combine two queries into One
Hi Gurus,
SQL> select * from v$version;
BANNER
Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL>
I have following two queries. How I can convert these two queries into one with the same result ?
Q1
SELECT id,vdate,vendorname,venddate,vid
FROM VENDOR
WHERE processid=32
AND venddate is null
AND vid in(select vid from view_vid where type='PDX')
AND (id,vdate) not in (select id,vdate from vkfl_is where task_id=55)
AND (id,vdate) in (select id,vidate from market_data where marketed_date is null)
AND id not in (select id from location)
Q2
SELECT id,vdate,vendorname,venddate,vid
FROM VENDOR
WHERE processid=20
AND venddate is null
AND vid in(select vid from view_vid where type='PBX')
AND (id,vdate) not in (select id,vdate from vkfl_is where task_id=40)
AND (id,vdate) in (select id,vidate from market_data where region_date is null)
AND id not in (select id from location)
I can UNION these two queries, but, is there any way I can write a single query with which gives me same result as above two queries?
Any help would be highly appreciated
Thanks in advanceHi,
You can do something like this, which will be more efficient than a UNION:
SELECT id, vdate, vendorname, venddate, vid
FROM vendor
WHERE ( ( -- Conditions that apply only to q1
processid = 32
AND vid IN (SELECT vid FROM view_vid WHERE type = 'PDX')
AND (id,vdate) NOT IN ( SELECT id, vdate
FROM vkfl_is
WHERE task_id = 55
AND (id,vdate) IN ( SELECT id, vidate
FROM market_data
WHERE marketed_date IS NULL
OR ( -- Conditions that apply only to q2
processid = 20
AND vid IN (SELECT vid FROM view_vid WHERE type = 'PBX')
AND (id,vdate) NOT IN ( SELECT id, vdate
FROM vkfl_is
WHERE task_id = 40
AND (id,vdate) IN ( SELECT id, vidate
FROM market_data
WHERE region_date IS NULL
-- The remaining conditions apply to both q1 and q2
AND venddate IS NULL
AND id NOT IN (SELECT id FROM location)
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
See the forum FAQ: https://forums.oracle.com/message/9362002 -
Two Queries in one XSQL-Template
Hi there,
is it possibile to use two queries in one xsql-template, which are generated two seperated trees of XML?
I think about something like that
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsql:query connection="bynet"
null-attribute-indicator="true"
xmlns:xsql="urn:oracle-xsql"
rowset-element = "COLLECTION"
tag-case="upper"
row-element = "FIELD"
id-attribute = "">
select c_formtype from offer_collection
</xsql:query>
<xsql:query connection="bynet"
null-attribute-indicator="true"
xmlns:xsql="urn:oracle-xsql"
rowset-element = "COLLECTION2"
tag-case="upper"
row-element = "FIELD"
id-attribute = "">
select c_formtype from offer_collection2
</xsql:query>
which should give me
<COLLECTION>
<FIELD>
<C_FORMTYPE>lala</C_FORMTYPE>
</FIELD>
</COLLECTION>
<COLLECTION2>
<FIELD>
<C_FORMTYPE>lala</C_FORMTYPE>
</FIELD>
</COLLECTION2>
Any way to do this?
Thanx for help,
Christian HartmannSure, just enclose two <xsql:query> tags by any other outer tag:
<something xmlns:xsql="urn:oracle-xsql" connection="demo">
<xsql:query> select * from emp </xsql:query>
<xsql:query> select * from dept</xsql:query>
</something> -
Combining two queries in one..
Hi,
Can someone tell me how to combine follwoing two queries in one so that it will increase performance..
SELECT single PLNNR from AFKO
into T1
WHERE AUFNR = '007200000100'.
SELECT single STATU from PLKO
into T2
WHERE PLNNR = T1.using subqueries it is possible
select single statu from plko into t2 where plnnr in (select single plnnr from afko where aufnr eq '007200000100').
read about subqueries at this link...
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/dc7614099b11d295320000e8353423/frameset.htm
regards,
PJ -
Two queries in one output in BEx is it possibl ?
Hi,
Is there a possibility in Bex Excel screen that we can output two queries at the same time , like 1st query in first half and second query 2nd half of the screen .I think its not possible but just wanna know if anyone came across such an issue
I know it is possible with WAD ...Hi Raj,
You can execute 2 queries in one work book.First execute one query,place the cursor under query results area,go to tools->Insert query->execute.Save->Save existing work book.
When ever u open the work book u have to execute both the queries.Instead of executing twice you can use some options, so that it saves and reuses the input values and automatically refresh the queries when u open the work book(If the input values are fixed).
For that right click->Properties->Intraction tab
You can see 4 check boxes.check all boxes,ok for all queries and save.So when u open the work book it retrieves data.No need to give input values -
Hi Experts:
I face one problem of posting tax.
In some cases of our business,there r two types of taxes in one item. First one is paid by customer and another is paid by our company.
We want to generate the accounting document like that:
DR: customer AR
CR: SALES REVENUE
OUT PUT TAX PAID BY CUSTOMER
DR: EXPENSE Account
CR: Tax paid by us
Can I do it like this? If possible, how can I configure it?
Thanks and Best Regards
David WangHello,
Discuss with your finance team
Thanks
RK -
Select only one specific value from two values contained in an item in form
hi ,
i am newly creating a form.
in the all item i an displaying on control block,
in one item "dummy.formule" i am taking the value as '1-xyz' where 1 is nummer and xyz is naam
or '99-fgj'.
but for the next block i want to write a query in which in the where condition i need to use the nummer from dummy.formule.this query is dymannically created at run time.
i am wrting this query in the when validate of the "dummy.formule" .
how i get the specific value that i required?923315 wrote:
hi ,
i am newly creating a form.
in the all item i an displaying on control block,
in one item "dummy.formule" i am taking the value as '1-xyz' where 1 is nummer and xyz is naam
or '99-fgj'.
but for the next block i want to write a query in which in the where condition i need to use the nummer from dummy.formule.this query is dymannically created at run time.
i am wrting this query in the when validate of the "dummy.formule" .
how i get the specific value that i required?First look at it. dynamically create pop list at run time. close it.
what you mean by "naam" ?
If the value has a specific format like as you write "1-xyz,99-fgj". you can use instr function and substr function to cut it out..
Hope this helps. -
Two Queries In One Workbook With Calculations
Hi Guys,
Can you have 2 queries in one worksheet, either ran as a query or save as a workbook and calculation done at runtime. For example, query A and query B to show up in one sheet when you run query A. You now want a simple calculation done......for example.......A1 row from query A divided by B1 row from query B. The result to show up on the Key Figure structure in query A.
Thanks,
Recca
Edited by: Recca Recca on Jul 11, 2011 4:45 PMHi,
I am not sure about this but we had similar kind of requirement and what we did was,
One query in one tab, another query on second tab and we did key figure calculations on third tab of the workbook eg. Sheet1 A1 - Sheet2-A1 and the result was stored on sheet3.
We saved the workbook and used to refresh the same whenever we want to see new data.
Regards,
Durgesh.
Maybe you are looking for
-
If I buy a HDMI to VGA adapter can I watch sky go from my iPad
If I buy this adapter will I be able to watch Sky Go from my iPad through my Apple TV? Because it doesn't support HDMI out put?
-
Distribution problem in labview 2011(Error 11004)
Hi,everyone. I have a problem when i install my build "install". If i include "NI Labview Run-Time Engine 2011" in additional installers, the build files show the error message" .\Distribution.cpp(2072): InstallerError 11004 Developer Error. Distribu
-
Number of digits in Skype number?
I'd like to make a number for Australia. I'm just wondering how many digits are in a Skype number? And what numbers is the Skype number likely to start with? Thanks Solved! Go to Solution.
-
Business Catalyst (Self Hosting Package): Any Plan? Will be nice
I think it will nice Adobe puts BC as an additional option where BC can be privately hosted by a partner via any hostiing provider. This will make BC more flexible for most customers that do not want to move their hosting from existing providers. Wh
-
How to move AE5 from one computer to another without the disc?
I am working for a company that installed Adobe After Effects 5 last year on one Imac machine and we need to move that program to another computer. I believe they downloaded the application. We have a serial number, but don't want to install it on th