Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 5th, 2005, 01:53 AM
roopa_arju roopa_arju is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 6 roopa_arju User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 37 m 38 sec
Reputation Power: 0
Question Aliases in SQL

Hi,

I have a query which contains alias like this

RP_BANK_MVA b1,
RP_BANK_MVA b2,
RP_BANK_MVA b3,

then in condition i check

bso.SETTLEMENT= b1.BANK_CODE
AND b1.FLAG = 0
AND bso.HANDLING= b2.BANK_CODE
AND b2.FLAG = 0
AND bso.OWNING= b3.BANK_CODE
AND b3.FLAG = 0


if i use the same b1 instead of b2 and b3 what will happen.I am thiniking why to have 3 aliases.
Please tell me

Reply With Quote
  #2  
Old September 14th, 2005, 12:52 PM
wubandit99 wubandit99 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 30 wubandit99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 6 m 31 sec
Reputation Power: 4
If you use only one table in the where clause as in:

bso.SETTLEMENT= b1.BANK_CODE
AND bso.HANDLING= b1.BANK_CODE
AND bso.OWNING= b1.BANK_CODE
AND b1.FLAG = 0

Then your query will only return rows where bso.SETTLEMENT, bso.HANDLING, and bso.OWNING are all the same number.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Aliases in SQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway