Wrox Programmer Forums
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 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
Old March 1st, 2007, 05:35 AM
Registered User
Join Date: Mar 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default self join query error

I want to show same field form database each with different conditions in datagrid.I use oacle as back-end.For that,I use self join as below:

 sql2 = "select m1.int_no(select int_no from exg_main_master where o_r_tag = 'O'),m2.int_no(select int_no from exg_main_master where o_r_tag = 'R') from exg_main_master m1,exg_main_master m2 where m1.emp_no_dept_code = '" & txteno.Text & "' and m2.emp_no_dept_code = '" & txteno.Text & "'"

But I am getting error:
System.Data.OracleClient.OracleException: ORA-00936: missing expression

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help using join in SQL query yogeshyl SQL Language 1 July 30th, 2008 04:12 AM
Updating query using inner join sintax error gfranco Access 0 April 18th, 2008 10:08 PM
Nested Query or Join? rlull SQL Server 2000 4 November 10th, 2005 05:23 PM
JOIN query wverner Access 2 April 5th, 2005 01:44 PM
Join Query tsimsha Classic ASP Databases 2 December 2nd, 2004 09:31 AM

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