Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Produce output based on Join between View and Table

Posted on 2011-09-19
12
Medium Priority
?
226 Views
Last Modified: 2012-05-12
Have one view 'v' which gives results when said select * from v

Have one table with a field 'x' common/present in view 'v' and table 't'

join the table 't'  to view 'v' based on field 'x'

please help experts

did search on google but in vain...
0
Comment
Question by:XxtremePro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
12 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 36561995
I'm not understanding the question?

A simple join is:
select 1 from v, t where t.x=v.x;
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 36561997
are you trying to build a join

like    

select *
from v inner join t on  v.x = t.x
0
 

Author Comment

by:XxtremePro
ID: 36562016
Yes I am supposed to use a join

0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 74

Expert Comment

by:sdstuber
ID: 36562034
both of the above are join syntax
and equivalent join conditions

the only difference is what is being returned.

the first post returns 1 for every x found in both tables
the seond returns every column of both tables for every x found in both tables

if you want to adjust the output,  simply specify the columns


v.yourcol1, v.yourcol2, t.yourcol1, t.yourcol2
0
 

Author Comment

by:XxtremePro
ID: 36562160
The query worked thanks a lot experts

but the actual questions comes now where I need to output column A in view along with the columns B and C

Please do help experts.. thanks a lot
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 36562171
select v.a, t.b, t.c
from ...
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 36562175
Sorry.  sdstuber already answered that in http:#a36562034
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 36562614
why the B?

that's a penalty, since you didn't ask for any followup, what is missing
0
 

Author Comment

by:XxtremePro
ID: 36562670
Dude

I did not know that.. let me know how to change and shall do it...

You are simply the best man..
0
 

Author Closing Comment

by:XxtremePro
ID: 36588774
Thank you very much

as said

YOU ARE THE BEST
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 36588851


I see you're still relatively new to EE - welcome aboard!

You should accept the post (or posts) that actually helped you


http:#36562614  isn't an answer.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to take different types of Oracle backups using RMAN.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question