SunQuest
 
           Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old May 13th, 2008, 03:51 AM
CodeQuest CodeQuest is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 14 CodeQuest User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 40 m 29 sec
Reputation Power: 0
SQL Server 2005 - Getting an exception while running the particular query first time

Hi Friends,
we are getting an exception while running the following query first time. next time its executing properly.

05/13/2008 02:06:59|RxOrderServer_DEVTEST12_1|6|2|SQLQuery: erform_rs|Running query [GET_MCRORDERS_POF_RETRIEVE]
05/13/2008 02:06:59|RxOrderServer_DEVTEST12_1|6|2|SQLQuery_OS ql:erform| IN: QueryID=[22627]
05/13/2008 02:06:59|RxOrderServer_DEVTEST12_1|6|2|SQLQuery_OS ql::runQuery|Running query [SELECT A.ORDER_ID FROM SDA_POF.POF_FACILITY A, SDA_POF.RXORDER B WHERE A.WORK_TELEPHONE_NUMBER = '9725074641' AND B.ACCOUNT_ID = '6442224' AND B.ORDER_STATUS = 'MCR'AND A.ORDER_ID = B.ORDER_ID]
05/13/2008 02:06:59|RxOrderServer_DEVTEST12_1|6|0|LibExceptio n constructor|[SQLQUERY_Oracle::runQuery] - [0: [SQLQUERY_Oracle::runQuery]Error executing query]
05/13/2008 02:06:59|RxOrderServer_DEVTEST12_1|6|0|LibExceptio n constructor|[SQLQuery_OSql::runQuery] - [0: [SQLQuery_OSql::runQuery]Unable to run query 22627]
05/13/2008 02:06:59|RxOrderServer_DEVTEST12_1|6|1|SQLQuery_OS ql:erform|Running query [22627], will try alternate
05/13/2008 02:06:59|RxOrderServer_DEVTEST12_1|6|2|SQLQuery: erform|Query ID=[22627]
05/13/2008 02:06:59|RxOrderServer_DEVTEST12_1|6|2|SQLQuery: erform|Query SQL = [SELECT A.ORDER_ID FROM SDA_POF.POF_FACILITY A, SDA_POF.RXORDER B WHERE A.WORK_TELEPHONE_NUMBER = '9725074641' AND B.ACCOUNT_ID = '6442224' AND B.ORDER_STATUS = 'MCR'AND A.ORDER_ID = B.ORDER_ID]
05/13/2008 02:06:59|RxOrderServer_DEVTEST12_1|6|2|SQLQuery_OS ql:erform| OUT: QueryID=[22627]

I want to correct this error. please help me what is wrong in this query.

TIA

Reply With Quote
  #2  
Old May 13th, 2008, 04:28 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Contributing User
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 1,259 sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 23 h 8 m 7 sec
Reputation Power: 783
Hi,

I'm not sure if this is the cause, but there appears to be no space between 'MCR' and the AND:
Code:
SELECT A.ORDER_ID FROM SDA_POF.POF_FACILITY A, SDA_POF.RXORDER B WHERE A.WORK_TELEPHONE_NUMBER = '9725074641' AND B.ACCOUNT_ID = '6442224' AND B.ORDER_STATUS = 'MCR'AND A.ORDER_ID = B.ORDER_ID

Reply With Quote
  #3  
Old May 13th, 2008, 04:47 AM
CodeQuest CodeQuest is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 14 CodeQuest User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 40 m 29 sec
Reputation Power: 0
Quote:
Originally Posted by sync_or_swim
Hi,

I'm not sure if this is the cause, but there appears to be no space between 'MCR' and the AND:
Code:
SELECT A.ORDER_ID FROM SDA_POF.POF_FACILITY A, SDA_POF.RXORDER B WHERE A.WORK_TELEPHONE_NUMBER = '9725074641' AND B.ACCOUNT_ID = '6442224' AND B.ORDER_STATUS = 'MCR'AND A.ORDER_ID = B.ORDER_ID


Thanks a lot. we missed to notice this. Due to this only we are getting error.

Reply With Quote
  #4  
Old May 13th, 2008, 05:02 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Contributing User
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 1,259 sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level)sync_or_swim User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 23 h 8 m 7 sec
Reputation Power: 783
Quote:
Originally Posted by CodeQuest
Thanks a lot. we missed to notice this. Due to this only we are getting error.

No problem, glad it helped!!!

It looks as if the reason it only failed on the first iteration is because it appears to be executing an alternative query if the first execution fails!!

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > SQL Server 2005 - Getting an exception while running the particular query first time


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway