Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

No data found error Expand / Collapse
Author
Message
Posted Tuesday, March 26, 2013 8:00 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 26, 2013 8:17 AM
Points: 1, Visits: 9
I also had code working perfectly yesterday and errors today. I have a view pulling data from oracle with an openquery, and a stored procedure using the view with SQL tables. The SP works without the where clause, but errors with "No data found" when the where clause is included. I ended up dumping the view into a temp table first, then using the temp table in the stored procedure and that works. It looks like a problem with date formatting, but who knows why it worked yesterday and not today???
Post #1435498
Posted Tuesday, March 26, 2013 8:16 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Monday, September 29, 2014 10:57 PM
Points: 4,242, Visits: 4,290
You should not get an error but you should include an exception Handler to Include WHEN NO DATA FOUND, perform an action.

Take you select statement and look at what is in the WEHRE Clause.

Examine the Data closely and determine what in the Where Clause is causing no data to be returned.



For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Post #1435514
Posted Sunday, June 15, 2014 12:37 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 6:36 AM
Points: 1,399, Visits: 6,773
For newbieuser: convert '18/01/2009' to a proper datetype instead of relying on the occasional dateformat of the server. By using convert?
For penny: have you checked the distiributed transaction coordinator security? (articles on the web)
Is there an Oracle MTS (multithreadedtransaction)-service runningn, so MS DTC can communicate with it
Post #1580946
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse