Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
| Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 21st, 2011, 03:10 AM
Authorized User
Points: 350, Level: 6
Points: 350, Level: 6 Points: 350, Level: 6 Points: 350, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: , , Pakistan.
Posts: 54
Thanks: 8
Thanked 1 Time in 1 Post
Default How can I transform this IMPLICIT query into EXPLICIT query?

Transforming the following IMPLICIT query into EXPLICIT query?
Select A1.Account_type,A1.Title, A2.Channel_id,A2.Account_type
from Tblaccount A1, Tblcustchannelacct A2
where A1.Account_type = A2.Account_type;
How can I transform the above IMPLICIT query into EXPLICIT query? The above query is working fine; I transformed the above query into EXPLICIT query as
Select A1.Account_type,A1.Title, A2.Channel_id,A2.Account_type
from Tblaccount A1, Tblcustchannelacct A2
INNER JOIN Account_type
on A1.Account_type = A2.Account_type;
this query is giving error of ‘Table or View does not exist’. Can you guide me with this?
Thanks in advance
__________________
How to do programming?
  #2 (permalink)  
Old February 21st, 2011, 09:52 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Code:
Select 
 A1.Account_type,
 A1.Title, A2.Channel_id,
 A2.Account_type
from Tblaccount A1
INNER JOIN Tblcustchannelacct A2 on A1.Account_type = A2.Account_type;
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
The Following User Says Thank You to om_prakash For This Useful Post:
arbab (February 22nd, 2011)
  #3 (permalink)  
Old April 8th, 2011, 06:43 AM
Authorized User
 
Join Date: Nov 2006
Location: Bangalore, Karnataka, India.
Posts: 31
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via ICQ to debasisdas Send a message via AIM to debasisdas
Default

Officially there is no term called IMPLICIT query or EXPLICIT query.

These terms are used for cursors not for query.

I think what you are trying to do is convert a query written in conventional SQL into ANSI SQL.
__________________
Regards
Debasis
  #4 (permalink)  
Old April 11th, 2011, 05:21 AM
Authorized User
Points: 350, Level: 6
Points: 350, Level: 6 Points: 350, Level: 6 Points: 350, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: , , Pakistan.
Posts: 54
Thanks: 8
Thanked 1 Time in 1 Post
Default Thanks with a question

@debasisdas: Thanks for your correction: I was expressing the query which uses keyword of INNER JOIN or something as IMPLICIT and those which do not as EXPLICIT, what can be the proper name for them?
&
Transforming the following query in a query which has INNER JOIN mentioned in it?
Select A1.Account_type,A1.Title, A2.Channel_id,A2.Account_type
from Tblaccount A1, Tblcustchannelacct A2
where A1.Account_type = A2.Account_type;


The above query is working fine; I transformed the above query into this query as, now using KEYWORD of INNER JOIN
Select A1.Account_type,A1.Title, A2.Channel_id,A2.Account_type
from Tblaccount A1, Tblcustchannelacct A2
INNER JOIN Account_type
on A1.Account_type = A2.Account_type;
this query is giving error of ‘Table or View does not exist’. Can you guide me with this?


Thanks in advance
__________________
How to do programming?
  #5 (permalink)  
Old April 11th, 2011, 05:45 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I haven't worked with Oracle for a few years but with SQL Server the syntax would be:
Code:
SELECT 
  A1.Account_type,
  A1.Title,
  A2.Channel_id,
  A2.Account_type
FROM
 Tblaccount A1 INNER JOIN Tblcustchannelacct A2
 ON A1.Account_type = A2.Account_type;
__________________
Joe
http://joe.fawcett.name/
The Following User Says Thank You to joefawcett For This Useful Post:
arbab (April 19th, 2011)
  #6 (permalink)  
Old April 12th, 2011, 12:33 AM
Authorized User
 
Join Date: Nov 2006
Location: Bangalore, Karnataka, India.
Posts: 31
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via ICQ to debasisdas Send a message via AIM to debasisdas
Default

The error is because you are trying to join 3 tables and the 3rd table is not joined to anything.

Post the table structures to get proper query.
__________________
Regards
Debasis


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update query doesnt run when Select query does (In MS Access) rmccafferty SQL Language 3 February 11th, 2010 04:54 AM
Output Query to txt file from SQL Query everest SQL Server 2005 4 November 22nd, 2007 01:49 AM
Transform query tulincim Access ASP 2 October 4th, 2005 08:50 AM
Syntax error in query. Incomplete query clause. dispickle ADO.NET 3 April 16th, 2004 01:04 PM
Error on Make-Table Query In Union Query rylemer Access 1 August 20th, 2003 07:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.