Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 1st, 2007, 06:39 AM
Registered User
Join Date: Mar 2007
Location: surat, guj, India.
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
  #2 (permalink)  
Old March 1st, 2007, 05:56 PM
Friend of Wrox
Points: 793, Level: 10
Points: 793, Level: 10 Points: 793, Level: 10 Points: 793, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2005
Location: OKC, OK, USA.
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts

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.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 07:59 PM.

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