Two selects for one table
Greetings from a Creator newbie!
I'm developing an application where I need to show a table with data from two subsequent queries - the underlying MySQL database is unable to do subselects, so I've to use a temporary table. Simply binding a rowset to a table doesn't work here.
What is the "Creator-Way" to do this?
Markus
Hi,
I am not using MySQL, but did you try a to use UNION to join the query results.
Something like this:
select a.col1 as COL_1, a.col2 as COL_2 from table1 a
UNION
select b.col1 as COL_1, b.col2 as COL_2 from table2 bThe columns must be of the same type(s).
Hope this helps,
Catalin Florean.
Similar Messages
-
Is it possible for two owners for one table in oracle?
SQL> select owner,table_name
2 from dba_tables
3 where table_name = 'DEPT';
OWNER TABLE_NAME
MANO DEPT
SCOTT DEPT
SQL>
SQL>
SQL> show user;
USER is "MANO"Hi,
It is not two owners for 2 tables but twotables and two owners.
Login as Mano
do a
insert into dept values (blahh..blahh..);
commit;Now login as scott
select * from dept;You will see the difference.
What you need to understand is there are physically two tables owned by two different users with the same name.
Hope it clears your confusion.
Cheers!!!
Bhushan -
Need to compare values in two columns of one table against values in two columns in another table
Hi, as the title reads, I'm looking for an approach that will allow me to compare values in two columns of one table against values in two columns in another table.
Say, for instance, here are my tables:
Table1:
Server,Login
ABCDEF,JOHN
ABCDEF,JANE
FEDCBA,SEAN
FEDCBA,SHAWN
Table2:
Server,Login
ABCDEF,JOHN
ABCDEF,JANE
FEDCBA,SHAWN
In comparing the two tables, I'd like my query to report the rows in table1 NOT found in table2. In this case, it'll be the 3rd row of table one:
Server,Login
FEDCBA,SEAN
Thanks.create table Table1([Server] varchar(50), Login varchar(50))
Insert into Table1 values ('ABCDEF','JOHN'),('ABCDEF','JANE'),('FEDCBA','SEAN'),('FEDCBA','SHAWN')
create table Table2([Server] varchar(50), Login varchar(50))
Insert into Table2 values ('ABCDEF','JOHN'),('ABCDEF','JANE'), ('FEDCBA','SHAWN')
select [Server] ,Login from Table1
Except
select [Server] ,Login from Table2
select [Server] ,Login from Table1 t1
where not exists(Select 1 from Table2 where t1.[Server] = t1.[Server] AND Login=t1.Login)
drop table Table1,Table2 -
Two prices for one material in sales order according condition type
Hi,
I configure the condition type according to following condition record:
Plant/ Sales Organization/ Distribution channel/ Material / Customer
(because system should calculate two prices for one material in two plants)
In the sales order screen, when user firstly select material , quantity, plant , system calculate the related price correctly but if user select the material and quantity and enter and after that select the plant, system will show the error message in pricing procedure and to have a price for material, user should update the price in the price condition in sales order.
It is so difficult for user to update one by one, because there are several sales orders which need to update.
Is it any way to solve this problem?
Thanks,> In the sales order screen, when user firstly select material , quantity, plant , system calculate the related price correctly but if user select the material and quantity and enter and after that select the plant, system will show the error message in pricing
Hi,
Why to let the user press Enter button before entering plant value Obviously, system will give error, because it doesnt get all the required value based on which you have maintained condition records.
Ask the user to enter all the value at item level otherwise you will have go for the option that you are doing currently.
It is said prevention is better than cure
Hope you get some inputs
regards,
Sagar -
Two address for one company code
Hi SAPians,
I have a doubt in maintaining company address for Invoice output!
Is it possible to maintain two Address for one company code?
Like if XYZ company code and say it has has two customers AB and CD.
Then if i want to maintain Company address on print layout for invoice Different to each. how can i achieve it.
If yes, please through light on it.
Regards,
RomeshHi ,
As far i know it is not possible to have two different address for the same company code.As table can hold only single unique data.
As far as the above answer is concerned, we use International version fo Customers not for Company Codes.
Hope it helps.
Thanks and Regards
Rohit. -
Fetch New Data shows two entries for one account
I have on a variety of accounts on my iPhone and my iPad: an iCloud, an Exchange, a IMAP, and a couple of Gmail accounts.
Earlier this week, I noticed that in the "Fetch New Data" setting (Settings > Mail, Contacts, Calendar > Fetch New Data), there are TWO entries for one of the Gmail accounts.
One entry lists "Mail and Calendars." I use this for this particular Gmail account. I have these selected in the "Accounts" section of Settings > Mail, Contacts, Calendar.
The other entry lists "Contacts and Calendars." I don't sync Contacts, but I do sync Calendars. Why is it listed twice?
I tried deleting
the offending Gmail account, but it did not delete the duplicate entries.
erasing all settings
all of my accounts, including iCloud, IMAP, and other accounts.
The ghost account is still there, fetching calendars and contacts.
Has anyone else seen this behavior?
I considered erasing settings and content, but that seems pretty extreme for something that might not be that big of an issue.Exact same problem here!!! Iphone 5s with IOS 7.0.3, using Gmail among other email providers.
So it is definately a bug - the "fetch new data ghost account". I hope it will be solved in a newer release. In the meantime, I switched the ghost account to "manual" so it shouldn't interfere... -
Two Selection for ACR 4.4 in Camera Calibration
Hi,
I was using Lr 2.2 and everything was fine, but I upgraded to Lr 2.3 and now I have two selections for the ACR 4.4 profile on the Camera Calibration panel. The profile choices are:
ACR 4.4
ACR 4.4
ACR 4.2
Adobe Standard
Camera Faithful
And so on...
Both work, but I dont need two. I've done all the usual stuff like uninstalling, reinstalling, removing camera profiles and so on with no luck. Any ideas? Where does Adobe store the ACR profiles?
BTW, there is only one selection for ACR 4.4 in Adobe Camera Raw in Ps CS3, if that helps.
Many thanks,
Dave
WinXP Pro, Lr 2.3, Ps CS3Thanks, but that's just it. The files have only been edited in Lr and not in Bridge or Ps, although I have those programs. I didn't have the problem in Lr 2.2 and it immediately appeared when I upgraded to Lr 2.3 without any changes to the images or to the Lr catalog.
I just tried removing Lr completly and deleting the existing catalog, and then re-installing Lr and creating a new catalog and importing my images into it. It still does the same thing - two copies of ACR 4.4. -
Multiple header rows for one table?
Using html it's possible to set up multiple table header rows for one table but with APEX Reports I don't see how to implement this. Any ideas?
I want to use the second header row to provide links to data for the column only (not a row). But I still want sortable columns so I want to maintain the default column header behavior too.
Thanks,
LindaMike,
I tried that and found that indeed the substitution string is working and shows in both debug regions I set up on each page I tested.
I have tried this on two kinds of pages. It works correctly on standard pages with PPR report regions.
It is not working correctly on a page based on Carl's tabbed regions with PPR reports. One click and the header disappears. This is the version I really want to get working.
I'd like to post something but have asked twice for a space on apex.oracle.com and have yet to receive even an email acknowledging my request.
Perhaps you can help me get a space?
My new problem on the tabbed page where my multiple headers are working is that when I click on a link in the header, it loads that page below the tab. But if I now click on the tab again, rather than return to the original tab page, I get error "ERR-1777: Page 4042 provided no page to branch to. Please report this error to your application administrator. " This happens on both the tabbed regions pages and on the standard tabbed pages. I guess I need to provide a differently formatted url? It is currently like this -
-----------------------"<th id="opt-details1" [a href="f?p=&APP_ID.:3001:&APP_SESSION.:::::"] View Details</a></th>" --------------[not really square brackets but I didn't know how to make this show in the forum with proper <> brackets ----------------------
Thanks again,
Linda
---sorry for the lack of white space. It seems to happen when I post on forums on Sunday nights - all white space is removed. -
How to create two respone for one request
Hi
is there any way for us to create two response for one request
the scenario is as below
1. user click on update button for particular record in the datatable (
after its get updated and status get updated = 'UPDATED' it will remove the object from ObjectListDataProvider and clear the tablePhaseListener ).
2. After it gets updated successfuly , i want to prompt the user with generateExcel function which using response.getOutputStream() using Apache POI.
How can we combine 1 and 2 together
Here what i have tried and didnt work
1. i tried to put the generateExcel function in destroy() method after page is rendered but it gives me Exception
2. i tried to put the generateExcel function in prerender() method
but the page will only execute the generateExcel function
- the data still get updated to the database but it doesnt refresh the page ( i meant the removing object and tablephaseListener.clear() doesnt work )
3 . i tried to put generateExcel Function after it process the data
public String updateData()
//update data
if(success){
// prompt user to save excell sheet
return null;
}This one also doesnt work and gives the same behaviour as number 2
The Prompt to save excel sheet still gets popped up
but the page just doesnt get refreshed
Thanks
is anybody know the workaround?yea i did set some alert message and clear the table by calling
provider.removeRow and commitChanges
it just doesnt reflected in the page that we see
by actually is already removing the row from the provider
Thanks -
Two billing for one sales order for same customer
Dear All ,
I have a requirement of posting a two billings for one sales order.
One is for Sales and another is for commission...
Entry could be
Sales Entry - Db Customer
Cr Sales
Commission entry could be
Db - Cusomter
Cr- Sales commission income account (P/L)
We are having third party sales scenario , In this case billing is MIRO dependent.
Once the miro is done then only billing is possible ...
Could you please advise on that ..
Regards,
SukhDear Ratish,
Thanks for yr reply.
I already did that but it is not serving business purpose.
Comm payment - comes diff time than sales payment.
so ,I will post one entry customer will get hit with total amount Sales + commission
like below
Let say 10, 000 is the sales value and 500 is the commission
So , This entry will get posted
Customer Db- 10,500
Sales Cr- 10,000
Comm Income Cr- 500
But, As I said sales amt will be paid before so We need to clear it partially and some time customer pays also diff amount due to some defect.
So, We wont be knowing for which case we have or havnet received the payment against commission.
As , Customer account is got hit with total amount( Sales+ Comm..value).
Pls advise how to solve this.
Regards,
Sukh -
Hi All,
I have to create two sids for one database. I am using Oracle 9i on Windows machine as well as linux machine. Is there any possible to assign two sid's for one database.
Give me the suggestions...
Cheers,
Moorthy.GSI think you need to define your term 'database' here
In Oracle world, database is usually referred to as instance.
a SID is one database instance, that's why, people will tell you that you can't have two SID for one database (instance)
However, if your 'database' means the schema and data, then yes, you can run two instances (with two SID of course) to host the same schema and data. -
Cant use constant selection for ONE restriction in selection
Hi, all
BW70 SP8, BI Addon SP8 Rev 802. I cant use constant selection for ONE restriction in selection, i can set constant selection only for whole selection, but it fix value for all query. I need to fix only one character value.
Is there a way of doing this?Global restricted key figure doesn't allow to restrict one char too. There is no constant selection checkbox in restricting char context menu.
I use multiprov. Prov1 consists of Char1, Char2 and KF1. Prov2 consists of Char1, Char2, and KF2.
I want to restrict Prov2.Char2 to # for KF2, and not restrict Char1, but! I can set constant selection for only whole selection(KF2 and Char2=#). So it has same value for all Char1 values. I need to constant selection only for char2. -
LMS 4.2 - Two notifications for one alarm.
Currently when a device, say a router goes offline we receive two Active 'Unresponsive' alarms for the router and then when it comes back online we receive two Cleared 'Unresponsive' alarms. All have their own unique Event ID. (shown below)
I was wondering if anyone could help me to config LMS to send only one Active 'Unresponsive' notification when a device is offline and then one Cleared 'Unresponsive' when the device is back online.
Here's an example of the Active 'Unresponsive' alarms I receive when I power the router off:
Notification 1
EVENT ID = 0002BI5
TIME = Thu 29-Nov-2012 15:26:32 EST
STATUS = Active
SEVERITY = Critical
MANAGED OBJECT = router.domain
MANAGED OBJECT TYPE = Routers
EVENT DESCRIPTION = Unresponsive::Component=172.16.1.254 [router.domain];ComponentClass=IP;ComponentEventCode=1098;InterfaceType=ETHERNETCSMACD;InterfaceMode=NORMAL;InterfaceAdminStatus=UP;Address=172.16.1.254;IPStatus=TIMEDOUT;InterfaceOperStatus=UP;Ne
CUSTOMER IDENTIFICATION = COMMS TEAM
CUSTOMER REVISION = 1
NOTIFICATION ORIGINATOR = Fault Management Module
Notification 2
EVENT ID = 0002BI6
TIME = Thu 29-Nov-2012 15:26:57 EST
STATUS = Active
SEVERITY = Critical
MANAGED OBJECT = router.domain
MANAGED OBJECT TYPE = Routers
EVENT DESCRIPTION = Unresponsive::Component=router.domain;ComponentClass=Router;ComponentEventCode=1101;SystemObjectID=.1.3.6.1.4.1.9.1.569;Description=Cisco IOS Software, C870 Software (C870-ADVIPSERVICESK9-M), Version 12.4(15)T13, RELEASE SOFTWARE (
CUSTOMER IDENTIFICATION = COMMS TEAM
CUSTOMER REVISION = 1
NOTIFICATION ORIGINATOR = Fault Management Module
Any suggestions?Am I alone with this issue of receiving two notifications for one Unreachable event?
-
Hi Everyone,
Is it possible to give two titles for one dialog screen.
Based on a grid i perform centain things where the user has to enter the values in the dialog screen.
To this screen i want to title based on the which grid it is. Is it possible to do.
Can anyone help me on this.
Thanks,
Prabs.when you define the title bar (to be used with set title bar)
enter the text with place holders like below.
& & my &
later in your program you can supply text for & using set title bar.
set titlebar 'MYTITLE' with 'This' 'is' 'test' .
This would produce title bar as
This is my test
set titlebar 'MYTITLE' with 'Where' 'is' 'Title' .
This would produce title bar as
Where is my Title.
Hope this is clear.
Regards
Raja -
Two invoices for one sales order
I want to create two invoices for one sales order
Scenario is like to create sales order for value of 100 $, and I want to send order reference billing after saving the sales order for 10% of order amount
I would say 10% of 100 $
And after delivery I want to issue a invoice for 90 %( rest of the amount) which is delivery relevant invoice.
Both invoices will be relevant of accounting.
Would any body suggest this, how it would be mapped it in to SAP.Hi Suresh,
It is possible in Partial billing. Maintain the Billing plan and create a plan with the inputs as u specified.
Go to IMG-SD-Billing-Billing plan. Do ur own configuration for Billing plan.
Now in Sales document creation mode....header details-Billing plan, U block the billing schedules and as per ur requirement , remove the billing block and create billing document.
If u configured Account detrmination procedure, U wld get the accounting document wrt billing document.
Hope this wld help U.
Regards,
Praveen
Maybe you are looking for
-
Hi, I have 1 iPad and 1 iPad mini. I use both iPad same Apple ID? So now iPad mini is with my sister. How do I separate the apple? The games enter always sign in my old Apple ID which Is use by my sister iPad mini. I already create a new Apple ID but
-
hi! my new web printer doesn't work in wireless mode. Pheraps is necessary a router? Thanks to everyone can help me! :-)
-
How to put path variables into a jar?
Hey, I'm writing a Java prg, that needs some path variables for the JVM. I used to pass them over to the JVM each time at start up. Since this solution seems to me slightly complex I wonder if there's no other solution like e.g. placing them into a .
-
Copying the file in Director Lingo
Hi! I am opening a file using the openFile command in director but what i need is to open the file as well as copy the same file to a local drive.Can it be done in director and can i get code snippet for the same.Is there any comand in director for c
-
Help me please I can not turn my computer due the password!!!!!!
I forgot the password that allows me to turn on the computer and I can not find the EFI number, so how can I do to turn on the computer without the password and then EFI number or how to change the password ????? Please I need some help, i'm really l