Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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, 06:39 AM
Registered User
 
Join Date: Mar 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default query to get same field twice in datagrid

 I want to show same field form database each with different conditions in datagrid.I use oracle 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
 
Old March 1st, 2007, 05:56 PM
Friend of Wrox
 
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

Aneri:
Try placing a semi-colon ";" at the end of the SQL statement before the last double quotes (i.e. as is = "'", to be = "';")

Hope this helps.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Query must have at least one destination field Spydermine Access 2 May 3rd, 2007 07:47 AM
Create a field in a query Vision G Access 1 July 26th, 2006 03:33 PM
Multiple field query PLUS Durwood Edwards Access 5 July 26th, 2005 09:08 AM
mulitiple field query PLUS Durwood Edwards Classic ASP Databases 2 July 14th, 2005 10:54 AM
Query DateTime Field mtalam Access 5 June 3rd, 2004 06:51 AM





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