dbTalk Databases Forums  

SQL Query

comp.database.oracle comp.database.oracle


Discuss SQL Query in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jenny
 
Posts: n/a

Default SQL Query - 01-19-2005 , 01:23 PM






hi, could someone please tell me how do I get a query to show all the
fields in table2 only when table2.field1 exist in table1.field1

thanks in advance.
jenny


table 1 contains
--------------------------
field1
1
5
4
9


table 2 contains
--------------------------------

field1 field2
1 a
1 b
1 j
1 m
2 a
2 b
3 a
3 n
4 c
4 d


--------------
desired results:
---------------

table2.field1 table2.field2
1 a
1 b
1 j
1 m
4 c
4 d








Reply With Quote
  #2  
Old   
DA Morgan
 
Posts: n/a

Default Re: SQL Query - 01-19-2005 , 04:29 PM






Jenny wrote:

Quote:
hi, could someone please tell me how do I get a query to show all the
fields in table2 only when table2.field1 exist in table1.field1

thanks in advance.
jenny


table 1 contains
--------------------------
field1
1
5
4
9


table 2 contains
--------------------------------

field1 field2
1 a
1 b
1 j
1 m
2 a
2 b
3 a
3 n
4 c
4 d


--------------
desired results:
---------------

table2.field1 table2.field2
1 a
1 b
1 j
1 m
4 c
4 d
This is school work and I hope no one helps you with this: Ask
your instructor for help and don't cheat.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)


Reply With Quote
  #3  
Old   
Christopher Jung
 
Posts: n/a

Default Re: SQL Query - 01-19-2005 , 06:27 PM



I concur, very clearly homework. poor form in at least not trying to reword
the question. that being said I will award some bonus points. using a woman'
s name in a newsgroup will likely increase your chance of getting an answer,
regardless of your actual gender.

"DA Morgan" <damorgan@x.washington.edu> wrote

Quote:
Jenny wrote:

hi, could someone please tell me how do I get a query to show all the
fields in table2 only when table2.field1 exist in table1.field1

thanks in advance.
jenny


table 1 contains
--------------------------
field1
1
5
4
9


table 2 contains
--------------------------------

field1 field2
1 a
1 b
1 j
1 m
2 a
2 b
3 a
3 n
4 c
4 d


--------------
desired results:
---------------

table2.field1 table2.field2
1 a
1 b
1 j
1 m
4 c
4 d

This is school work and I hope no one helps you with this: Ask
your instructor for help and don't cheat.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)



Reply With Quote
  #4  
Old   
Jenny
 
Posts: n/a

Default Re: SQL Query - 01-21-2005 , 10:55 AM



chris and dan, the both of you need to get a life.

if I had time to waste such as yourselves, I would dignify your comments
with a response.

and thanks again for those who did help me.
jenny.




"Christopher Jung" <cjung (AT) blank (DOT) com> wrote

Quote:
I concur, very clearly homework. poor form in at least not trying to
reword
the question. that being said I will award some bonus points. using a
woman'
s name in a newsgroup will likely increase your chance of getting an
answer,
regardless of your actual gender.

"DA Morgan" <damorgan@x.washington.edu> wrote in message
news:41eedf3e$1_1 (AT) 127 (DOT) 0.0.1...
Jenny wrote:

hi, could someone please tell me how do I get a query to show all the
fields in table2 only when table2.field1 exist in table1.field1

thanks in advance.
jenny


table 1 contains
--------------------------
field1
1
5
4
9


table 2 contains
--------------------------------

field1 field2
1 a
1 b
1 j
1 m
2 a
2 b
3 a
3 n
4 c
4 d


--------------
desired results:
---------------

table2.field1 table2.field2
1 a
1 b
1 j
1 m
4 c
4 d

This is school work and I hope no one helps you with this: Ask
your instructor for help and don't cheat.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)





Reply With Quote
  #5  
Old   
DA Morgan
 
Posts: n/a

Default Re: SQL Query - 01-21-2005 , 12:05 PM



Jenny wrote:
Quote:
chris and dan, the both of you need to get a life.
Have one and I'm an instructor at the University of Washington
which uniquely positions me to suggest that you get some ethical
standards. If you were my student you'd be in the dean's office.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)


Reply With Quote
  #6  
Old   
goodlie
 
Posts: n/a

Default Re: SQL Query - 04-24-2005 , 01:15 PM



Actually Jenny Tom or Henry Wnkler what difference does it make fellows if
anyone needs help.

The idea is to learn by the way homework means open book even if it was I
try to do problems when I cant find them explained properly when some dumb
author does not cover from my experience I ask is this something new duh
I also am trying to learn so appreciate any answers people can provide there
are a million ways to do the same problem.
Thanks but no thanks to those non helpers
please post the answer thanks allot so we can all benefit.

"Jenny" <jenny (AT) nospam (DOT) com> wrote

Quote:
hi, could someone please tell me how do I get a query to show all the
fields in table2 only when table2.field1 exist in table1.field1

thanks in advance.
jenny


table 1 contains
--------------------------
field1
1
5
4
9


table 2 contains
--------------------------------

field1 field2
1 a
1 b
1 j
1 m
2 a
2 b
3 a
3 n
4 c
4 d


--------------
desired results:
---------------

table2.field1 table2.field2
1 a
1 b
1 j
1 m
4 c
4 d










Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.