Using IN with two columns
Hi all,
I have to perform a query like x,y not in(select x,y from k). How to do this. These two columns are composite primary keys in both tables although no references exists.
A sample table and expected result.
create table v(name varchar(10),place varchar2(10));
create table t(name varchar(10),place varchar2(10));
insert into t values('Antony','Ollur');
insert into t values('Paul','Ollur');
insert into v values('Antony','Ollur');
I need to select second row from table t which does not exist in v.
Expected result
Paul Ollur
Thanks in advance.
Antony Paul
There are a number of ways to do this:
SELECT * FROM t
WHERE (name, place) NOT IN
(SELECT v.name, v.place FROM v)
SELECT * FROM t
WHERE NOT EXISTS
(SELECT null FROM v
WHERE v.name = t.name
AND v.place = t.place )
SELECT t.name, t.place FROM t, v
WHERE v.name(+) = t.name
AND v.place(+) = t.place
AND v.name IS NULL
SELECT t.name, t.place FROM t, v
WHERE v.name != t.name
OR v.place != t.place
/The AND version of this last query doesn't work because both rows in T match a row in V on the basis of PLACE.
Cheers, APC
Similar Messages
-
Populating a table with two columns using a custom bean
hello,
Can someone provide me or give me a link to an example of populating a table (with two columns) with a custom bean?
thank you
fwu1)create a java class
2)have a list as a class variable
3) populate the list in the constructor..
4) map the values in the af:table
//Employee pojo
public class Employee {
public Employee() {
super();
private String empName;
private String empManager;
private String job;
public void setEmpName(String empName) {
this.empName = empName;
public String getEmpName() {
return empName;
public void setEmpManager(String empManager) {
this.empManager = empManager;
public String getEmpManager() {
return empManager;
public void setJob(String job) {
this.job = job;
public String getJob() {
return job;
//maanged bean
public class Bean {
private List<Employee> employee;
public Bean() {
super();
employee = new ArrayList<Employee>();
Employee e1 = new Employee();
e1.setEmpName("xxxxx");
e1.setEmpManager("xxxxxxxx");
e1.setJob("xxxxxxx");
Employee e2 = new Employee();
e2.setEmpName("yyyyyyy");
e2.setEmpManager("yyyyyyy");
e2.setJob("yyyyyyt");
Employee e3 = new Employee();
e3.setEmpName("zzzzzz");
e3.setEmpManager("zzzzzzz");
e3.setJob("zzzzzzzz");
employee.add(e1);
employee.add(e2);
employee.add(e3);
employee.add(e4);
public void setEmployee(List<Employee> employee) {
this.employee = employee;
public List<Employee> getEmployee() {
return employee;
}in the table map like
<af:table value="#{Bean.employee}" var="row" rowBandingInterval="0"
id="t1">
<af:column headerText="Employee Name" id="c1">
<af:inputText value="#{row.empName}" id="it5"/>
</af:column>
<af:column headerText="Employee Manager" id="c2">
<af:inputText value="#{row.empManager}" id="it2"/>
</af:column>
</af:table> -
Dynamic Table with two columns
Hi!
i have to create a Dynamic Table with two columns having 5-5 links each with some text...... three links r based on certain conditions....they r visible only if condition is true...
if the links r not visible in this case another links take it's place & fill the cell.
links/text is coming from database.
i am using Struts with JSP IDE netbeans
Please help me
BuntyIndiai wanna do something like this
<div class="box_d box_margin_right">
<ul class="anchor-bullet">
<c:forEach items="${data.faqList}" var="item" varStatus="status"
begin="0" end="${data.faqListSize/2-1}">
<li>${item}</li>
</c:forEach>
</ul>
</div>
<div class="box_d">
<ul class="anchor-bullet">
<c:forEach items="${data.faqList}" var="item" varStatus="status"
begin="${data.faqListSize/2}" end="${data.faqListSize}">
<li>${item}</li>
</c:forEach>
</ul>
</div>
wanna divide table in two columns....if one link got off due to condition other one take it's position...
I have created a textorderedlist
Bunty -
ComboBox with two columns?
Do you guys know how we can have a DAC comboBox with two columns(e.g. emp_no, emp_name) to update a column(e.g. emp_no) in database?
Thanks for your response.
Ali
nullgrin You don't like my suggestion of creating a view ( or view object ) that where you concatenate 2 or more strings of interest into a separate new attribute... that is used to display?
Yeah, kinda hokey, but quick to implement. -
Report module: LOV with two columns
I would like to create a LOV with two columns in a designer generated report module.
scott@ntw>select deptno, loc
2 from dept;
DEPTNO LOC
10 NEW YORK
20 DALLAS
30 CHICAGO
40 BOSTON
50 LAS VEGASIs it possible to create the lov of the report module with an indivdual select statement?
Does anyobody have an idea?Hi,
There are probably a number of ways that you can handle this, but the underlying principle for all of these would be that you need to have 2 reports. The first report would contain the first ten records and the second report would contain the next ten.
The way to do that would be to get the ROW_NUMBER() value for each line and, in the query defintion for each report, you would have a WHERE clause that restricted the results based on this value. The best way to do this would be to create a view and base the reports on this view. The view definition would include:
ROW_NUMBER() OVER (ORDER BY xxxx) AS ROW_NUMBER
where xxxx is the same order definition as the main ORDER BY clause. Each row will then get a ROW_NUMBER value that matches it's position in the query resultset.
Your first report would then have a WHERE clause of:
WHERE ROW_NUMBER < 11
the second report would have:
WHERE ROW_NUMBER BETWEEN 11 AND 20
The final step would be styling/positioning the reports. The first would probably be in Column 1 in the region and the second in Column 2. You would almost certainly have to adjust the styling and/or positioning using a style attribute in the region/report definitions.
Regards
Andy -
How to create a form with two column headings
I have a business request to create a data form to handle multi year data by month. This will require creating a form with two column headings - with the first row be Year and second row be month, and data entry will begin in the third row and down.
I can do multiple row headings in the layout design, but somehow can not get it to work for multiple column headings.
Thanks in advanceIf you're in the "Layout" tab, simply pull the "Years" dimension and the "Period" dimension into the Column section. Planning can be a little picky about where you "drop" the dimension as you're dragging and dropping it. Drop it in the cell directly under the letter name of the column. Other than that, there's not much to it.
Hopefully this helped,
- Jake -
How to define form within a table with two columns?
Hallo,
i want to design a form with two columns side by side.
My way is to define a table within the form:
<af:panelForm>
<afh:tableLayout width="100%">
<afh:rowLayout halign="left">
<af:inputText value="#{bindings.StsNr.inputValue}"
label="#{bindings.StsNr.label}"
required="#{bindings.StsNr.mandatory}"
columns="#{bindings.StsNr.displayWidth}"
readOnly="true">
<af:validator binding="#{bindings.StsNr.validator}"/>
<f:convertNumber groupingUsed="false"
pattern="#{bindings.StsNr.format}"/>
</af:inputText>
<af:selectOneChoice value="#{bindings.StammsaetzeStsEmpfangsart.inputValue}"
label="#{bindings.StammsaetzeStsEmpfangsart.label}"
tip="Brief, Fax, Mail">
<f:selectItems value="#{bindings.StammsaetzeStsEmpfangsart.items}"/>
</af:selectOneChoice>
</afh:rowLayout>
</afh:tableLayout>
</af:panelForm>
Is there a better way to do it?Hi reiasmus ,
Try <af:panelForm row="X">, that specifies the number of fields by columns. If you have ten fields and you fix row="5", you will obtain two columns with 5 rows on each.
Regards,
Tif -
Integrtion Scenario using BPM with two sender and multiple receiver
integrtion Scenario using BPM with two sender and multiple receiver
How many Application Components are required?Hi Vinod,
1) In integration repository you can have one or many software components it depends on your landscape orchestration
2) In integration direcory you need at least one service for bpm and one or many for each system in your bpm
also each connection between systems and bpm must have receiver determination and so on.
Advice: Please treat BPM as a separate system.
best,
Wojciech -
Using iPhone with two computers
Home PC - MacBook Pro
Work PC - Windows
both running iTunes 7.7
My music is on my home Mac and I manually create playlists, add music etc.
With my 3G Nano, I can connect and listen to songs on my iPod from my work PC. I can't seem to do this with my iPhone - my PC sees the iPhone but all of the music is greyed out and cannot be selected.
Is it a limitation of the iPhone that I cannot use it with two computers in this way, or is it a configuration issue?
I would prefer not to have to buy a set of external speakers just to use my iPhone to play music at work.
thanks
ShaneActually, there are several articles on the web about the fact that you CAN
synch the itunes with two computers. Music, Video, and Ringtones can be done from one computer, and Mail, Contacts, etc. can be done from a second computer.
Just do a Yahoo search on "synching iPhone with two computers."
If you are trying to do music from two computers, you are right, that will not work. There is a program, which I think the Yahoo search above will also uncover that allows you to do a "swap," where you can have the songs from one computer show up on the iPhone, and when you swap, the songs from the other computer show up. I am not sure if this utility survived the upgrage to version 2.0 of the softweare.
cheers,
Ray -
Using Berkeley With Two Different Environment Simultaneously
I am trying to use Berkeley with two different environment simultaneously in one program. But I am getting an error message of Databases left open. The first environment close with no error but the 2nd environment, having an error like this,
Exception in thread "main" java.lang.IllegalStateException: Unclosed Database: element_primary_key_index\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
Unclosed Database: class_catalog\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
Unclosed Database: element_database\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
Databases left open: 3
at com.sleepycat.je.Environment.close(Environment.java:383)
at com.svi.tools.gfs3v10domain.database.GFS3v10ReadWriteDatabase.closeUpload(GFS3v10ReadWriteDatabase.java:155)
at com.svi.tools.gfs3v10domain.GFS3v10Domain.closeReadWrite(GFS3v10Domain.java:160)
at com.svi.tools.gfs3v10.util.GFS3v10UploadUtil.closeUpload(GFS3v10UploadUtil.java:97)
at com.svi.tools.gfs3v10.GFS3v10.closeUpload(GFS3v10.java:115)
at com.svi.tools.gfs3v10uploader.util.Uploader.uploadFiles(Uploader.java:89)
at com.svi.tools.gfs3v10uploader.GFS3v10Uploader.mainMethod(GFS3v10Uploader.java:109)
at com.svi.tools.gfs3v10uploader.GFS3v10Uploader.main(GFS3v10Uploader.java:52)
Please someone help me with my problem. Thanks in advance.Hi Mark,
Here is my sample program for the problem:
import java.io.File;
import com.sleepycat.bind.serial.StoredClassCatalog;
import com.sleepycat.je.Database;
import com.sleepycat.je.DatabaseConfig;
import com.sleepycat.je.Environment;
import com.sleepycat.je.EnvironmentConfig;
import com.sleepycat.je.EnvironmentLockedException;
import com.sleepycat.je.SecondaryConfig;
import com.svi.tools.gfs3v10domain.objects.GFS3v10DomainElementData;
import com.svi.tools.gfs3v10domain.objects.GFS3v10DomainElementKey;
import com.svi.tools.gfs3v10domain.views.utils.ElementByPrimaryKeyCreator;
* Read Write Database used for every thing else.
public class MethodsSample implements GFS3v10Database {
* Environment where the Database resides.
private Environment environment = null;
private boolean isClose = false;
String environmentString;
* Class Catalog for Stored Classes.
private static StoredClassCatalog classCatalog;
* Element Database.
private static Database elementDatabase;
* Element Database by Primary Key.
private static Database elementByPrimaryKeyDatabase;
private static Database catalogDatabase;
* Default Constructor.
public MethodsSample() {
* Alternate Constructor.
* @param homeDirectory Location where the Database is Located.
public MethodsSample(String homeDirectory) {
environmentString = homeDirectory;
openEnvironment(homeDirectory);
openDatabase();
@Override
* Opens the Read Write Database.
* @param homeDirectory Location where the Database is Located.
public void openEnvironment(String homeDirectory) {
EnvironmentConfig environmentConfig = new EnvironmentConfig();
environmentConfig.setTransactional(true);
environmentConfig.setAllowCreate(true);
environmentConfig.setDurability(DURABILITY);
while (environment == null) {
try {
environment = new Environment(new File(homeDirectory), environmentConfig);
} catch(EnvironmentLockedException ele) {
try {
Thread.sleep(500);
} catch (InterruptedException e) {
@Override
* Opens the Database.
public void openDatabase() {
DatabaseConfig databaseConfig = new DatabaseConfig();
databaseConfig.setDeferredWrite(true);
databaseConfig.setAllowCreate(true);
catalogDatabase = environment.openDatabase(null, CLASS_CATALOG + environmentString, databaseConfig);
classCatalog = new StoredClassCatalog(catalogDatabase);
elementDatabase = environment.openDatabase(null, ELEMENT_DATABASE + environmentString, databaseConfig);
SecondaryConfig secondaryConfig = new SecondaryConfig();
secondaryConfig.setDeferredWrite(true);
secondaryConfig.setAllowCreate(true);
secondaryConfig.setSortedDuplicates(true);
secondaryConfig.setKeyCreator(new ElementByPrimaryKeyCreator(classCatalog, GFS3v10DomainElementKey.class, GFS3v10DomainElementData.class, String.class));
elementByPrimaryKeyDatabase = environment.openSecondaryDatabase(null, ELEMENT_PRIMARY_KEY_INDEX + environmentString, elementDatabase, secondaryConfig);
@Override
* Gets the Environment.
* @return Environment.
public Environment getEnvironment() {
return environment;
@Override
* Gets the Class Catalog.
* @return Class Catalog.
public StoredClassCatalog getClassCatalog() {
return classCatalog;
@Override
* Gets Element Database.
* @return Element Database.
public Database getElementDatabase() {
return elementDatabase;
@Override
* Gets Element By Primary Key Database.
* @return Element By Primary Key Database.
public Database getElementByPrimaryKeyDatabase() {
return elementByPrimaryKeyDatabase;
@Override
* Closes Database and then Environment.
public void closeUpload() {
System.out.println("1st Jar environment closing = " + environmentString);
elementByPrimaryKeyDatabase.close();
elementDatabase.close();
classCatalog.close();
catalogDatabase.close();
environment.close();
isClose = true;
public Boolean isClose() {
return isClose;
@Override
public void closeOthers() {
for the Main:
public class sample {
public static void main(String[] args) {
String environment1 = "\\\\192.168.160.184\\glassfish\\berkeley\\environment\\home\\Multiple\\Testing11";
String environment2 = "\\\\192.168.150.211\\glassfish3\\Berkeley\\environment\\Testing11";
openCloseEnvironment(environment1, environment2);
public static void openCloseEnvironment(String environment1, String environment2) {
MethodsSample forEnvironment1 = new MethodsSample(environment1); //Opens the Databases
MethodsSample forEnvironment2 = new MethodsSample(environment2); //Opens the Databases
forEnvironment1.closeUpload();
forEnvironment2.closeUpload();
// same error happens no matter what sequence for closing
Thank you. -
Topics with Two Columns, and ?s about Margins
I've been searching all over and can't quite get the answers I need. I have a robohelp project which will solely be for written documentation. Some of the topics within this project I would like two have two columns, the left column will just have headings and the right side will have content. I did accomplish this by making a table, however I can't remove the borders. I also tried another way by using this, which works great but when I made printed documentation it didn't make it look like I have on my screen (printed the headings all together then the content on later pages).
#container2 { clear: left; float: left; width: 100%; overflow: hidden; } #container1 { float: left; width: 100%; position: relative; right: 50%; } #col1 { float: left; width: 50%; position: relative; overflow: hidden; } #col2 { float: left; width: 50%; position: relative; overflow: hidden; }
So I guess I have a few questions to try and make this project go smoothly. Since I will only be using this project for written documentation, what would be the best way to make sure that each topic I am working on will print the way I want it to (margins, etc.)? Is there a good way to deal with my two column issue? Would making a style that indents the text be a good solution?You may also want to check out CSS columns. That will allow you to work without using tables and let the browser to take care of the rest. See: http://www.w3schools.com/css/css3_multiple_columns.asp
Kind regards,
Willam -
Hi all. Sorry, english is not my native language. I´ve made an .indd: each page has two columns with different threads (is a bilingual text). When I export this .indd to .epub only appears one column from a thread following the next thread. What can i do to fix this? My indesign is CS6
Thank youThere are fixed format EPUB files as can be used for children's books, etc. where there are a lot of illustrations. However, those are very work-intensive to produce. I've never worked on one.
Anne-Marie Concepcion did a Lynda.com video on producing one.
Rorohiko produces a product called ePubCrawler which can help in produced fixed format EPUB files:
Fixed Layout EPUB Assistant In InDesign: ePubCrawler | Rorohiko ... -
Vertical report with two columns
I have table with picture. I can display common sql report(horizontal or vertical). Is it possible to display this to two columns (eshop).Two vertical columns (for example field of records 10x2).
Message was edited by:
user542927Hi,
There are probably a number of ways that you can handle this, but the underlying principle for all of these would be that you need to have 2 reports. The first report would contain the first ten records and the second report would contain the next ten.
The way to do that would be to get the ROW_NUMBER() value for each line and, in the query defintion for each report, you would have a WHERE clause that restricted the results based on this value. The best way to do this would be to create a view and base the reports on this view. The view definition would include:
ROW_NUMBER() OVER (ORDER BY xxxx) AS ROW_NUMBER
where xxxx is the same order definition as the main ORDER BY clause. Each row will then get a ROW_NUMBER value that matches it's position in the query resultset.
Your first report would then have a WHERE clause of:
WHERE ROW_NUMBER < 11
the second report would have:
WHERE ROW_NUMBER BETWEEN 11 AND 20
The final step would be styling/positioning the reports. The first would probably be in Column 1 in the region and the second in Column 2. You would almost certainly have to adjust the styling and/or positioning using a style attribute in the region/report definitions.
Regards
Andy -
Problem with two-column layout
Hello,
I've done table-based layouts for several years, but I'm
trying to switch to CSS. I still have a lot to learn...
I'm trying to create a web site as a favor for a friend. She
hasn't figured out what she wants yet, so I've just been creating
some pages using canned designs. I created one using "Two-column
left nav" under Dreamweaver's "Page designs (CSS)":
http://www.alcie.org/demo2/
I want a fixed-width left navigation column and a fluid
content column.
I ran into several problems with the original design. The
most notible was that if I changed the browser window width, both
the content and nav columns would resize. I didn't want that, so I
set "navBar" width: 150px. That worked, but if I make the window
too narrow, the content starts to overlap the navigation column in
Firefox 1.5.0.6, and the navigation DIV drops to below the content
in IE 7 rc (I think) 3 and IE6. I tried removing the width
altogether, but that made things worse.
What is wrong with this picture? Is there a cleaner way to
solve my problem?
Thanks.> Is there a cleaner way to solve my problem?
Yes - dump that layout. It's too quirky. Go here and grab one
http://www.maxdesign.com.au/presentation/page_layouts/
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Clean & Sober" <[email protected]>
wrote in message
news:edgvl4$akl$[email protected]..
> Hello,
>
> I've done table-based layouts for several years, but I'm
trying to switch
> to
> CSS. I still have a lot to learn...
>
> I'm trying to create a web site as a favor for a friend.
She hasn't
> figured
> out what she wants yet, so I've just been creating some
pages using canned
> designs. I created one using "Two-column left nav" under
Dreamweaver's
> "Page
> designs (CSS)":
>
>
http://www.alcie.org/demo2/
>
> I want a fixed-width left navigation column and a fluid
content column.
>
> I ran into several problems with the original design.
The most notible
> was
> that if I changed the browser window width, both the
content and nav
> columns
> would resize. I didn't want that, so I set "navBar"
width: 150px. That
> worked, but if I make the window too narrow, the content
starts to overlap
> the
> navigation column in Firefox 1.5.0.6, and the navigation
DIV drops to
> below the
> content in IE 7 rc (I think) 3 and IE6. I tried removing
the width
> altogether,
> but that made things worse.
>
> What is wrong with this picture? Is there a cleaner way
to solve my
> problem?
>
> Thanks.
> -
Dimension with two columns In DWH
Hi all,
I am new to SSIS. Can i know if it is good model to create the dimension with only two columns i.e the key & the dimension in data warehouse (Eg: Company key, company Name)..
Thanks
sushYes no problems with that. But if there are any directly related attributes in another tables which qualifies company entity and is required in analysis it would make sense to include them within same dimension to avoid snowflaking (lookups) like say Company
Status, CompanyGroup etc
Its better to have denormalised tables which would have as much related attributes as possible for analytical/reporting purpose. Even in SSAS it would enable facts to be analysed using any of these attributes using a single regular relationship with the
common unified dimension
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page
Maybe you are looking for
-
I'm a new user. My fonts look different on different browser!
Hi, I have created a simple site and the fonts that i use in dreamweaver appears different on different browser after i uploaded the page. Can anyone please tell me why? i tried uploading the truetype fonts too but didn't work. Please help? Thanks al
-
hi everyone , having trouble with restoring my iphone, i did follow the step untul extracting the update software but when the iphone start to restoring my iPhone always turn off and it say Error 21 on my PC monitor ...please help me i cannot get my
-
Nothing will open with double click
Help! Our iMac seems to work OK, except that nothing will open with a double-click in Finder. It is not the mouse, which works fine. I rebuilt the directory with DiskWarrior, but that did not help. What is weird is that things do open with double-cli
-
Hello colleagues, Current situation is that all materials in all legal entities are valued and standard price but for some of these we require that materials are valued @ moving average prices. That means that in any given time we need a report that
-
Hilfe bekomme die Photos aus dem Photoarchiv nicht gelöscht
Hilfe bekomme die Photos aus dem Photoarchiv nicht gelöscht