If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > query not giving the result in ASP as SQL plus giving

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-02-04, 23:08
vinodvishal vinodvishal is offline
Registered User
 
Join Date: Oct 2004
Posts: 1
Unhappy query not giving the result in ASP as SQL plus giving

Database =Orcale 8i



here is the code

set rsn = Server.CreateObject("ADODB.Recordset")

set rsn=db.Execute("select SB_EMP_PERNO from v_shabash_empl where SB_DATE > '01-SEP-2004' ")



<%
Do While Not rsn.EOF
For I = 0 To rsn.Fields.Count - 1
Response.Write rsn(I)
Next
Response.Write "<BR>"
rsn.MoveNext
Loop

rsn.Close
%>



it giving all the PNO. No where condition working as it should gives only those PNO where

SB_date is greater than 01-SEP-2004



the same query is running in SQL plus giving the true value.



i don't understand where is the problem may be date format.



plz help me as soon as possible otherwise my boss will fired me....



Reply With Quote
  #2 (permalink)  
Old 12-05-04, 20:30
vextout vextout is offline
Registered User
 
Join Date: Jan 2003
Location: New York
Posts: 160
is the format of SB_DATE dd-MMM-yyyy , if not it might return all the values

i would test the code by doing
"select SB_DATE from v_shabash_empl"
Just to make sure the date format is the same
__________________
Beyond Limitation
Reply With Quote
Reply

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On