.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

SQL Server 2008 R2 X64 Problems with views & divide by zero in the where clause only

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :Sql Server
 
I'm a bit stumped on this one and have come up with several viable workarounds, but am unsure as to why they are necessary.  Here is some SQL: /*------------------------ SELECT PureCount = COUNT(*) FROM Reporting.dbo.UniqueAccountLinesPerJournal GO SELECT CountNoZeroDenomConfirm = COUNT(*) FROM Reporting.dbo.UniqueAccountLinesPerJournal WHERE ABS(Amount) != 0 GO SELECT SumOfOffendingEquation = SUM(Amount / ABS(Amount)), CountShowingPopulationUnchanged = COUNT(*) FROM Reporting.dbo.UniqueAccountLinesPerJournal GO SELECT Error = COUNT(*) FROM Reporting.dbo.TestTable WHERE Amount / ABS(Amount) != 1 GO SELECT Error = COUNT(*) FROM Reporting.dbo.UniqueAccountLinesPerJournal WHERE Amount / ABS(Amount) != 1 GO SELECT WorkaroundShowingCount = COUNT(*) FROM Reporting.dbo.UniqueAccountLinesPerJournal WHERE ISNULL(Amount / NULLIF(ABS(Amount),0),1) != 1 GO ------------------------*/ PureCount ----------- 5266117 (1 row(s) affected) CountNoZeroDenomConfirm ----------------------- 5266117 (1 row(s) affected) SumOfOffendingEquation CountShowingPopulationUnchanged ---------------------- ------------------------------- -866521 5266117 (1 row(s) affected) Error ----------- 3066319 (1 row(s) affected) Error ----------- Msg 8134, Level 16, State 1, Line 2 Divide by zero error encountered. WorkaroundShowingCount ---------------------- 3066319 (1 row(s) affected) Everything here is selecting


View Complete Post


More Related Resource Links

SQL Server 2008 R2 X64 Problems with views & divide by zero in the where clause only

  

I'm a bit stumped on this one and have come up with several viable workarounds, but am unsure as to why they are necessary.  Here is some SQL:

/*------------------------

SELECT PureCount = COUNT(*)

FROM Reporting.dbo.UniqueAccountLinesPerJournal

GO

SELECT CountNoZeroDenomConfirm = COUNT(*)

FROM Reporting.dbo.UniqueAccountLinesPerJournal

WHERE ABS(Amount) != 0

GO

SELECT SumOfOffendingEquation = SUM(Amount / ABS(Amount)),

CountShowingPopulationUnchanged = COUNT(*)

FROM Reporting.dbo.UniqueAccountLinesPerJournal

GO

SELECT Error = COUNT(*)

FROM Reporting.dbo.TestTable

WHERE Amount / ABS(Amount) != 1

GO

SELECT Error = COUNT(*)

FROM Reporting.dbo.UniqueAccountLinesPerJournal

WHERE Amount / ABS(Amount) != 1

GO

SELECT WorkaroundShowingCount = COUNT(*)

FROM Reporting.dbo.UniqueAccountLinesPerJournal

WHERE ISNULL(Amount / NULLIF(ABS(Amount),0),1) != 1

GO

------------------------*/

PureCount

-----------

5266117

(1 row(s) affected)

CountNoZeroDenomConfirm

-----------------------

5266117

(1 row(s) affected)

SumOfOffendingEquation CountShowingPopulationUnchanged

---------------------- ------------------------

Having problems installing/setting up SQL Server 2008 Express/R2 for ASP.NET user management on deve

  
I'm a bit new to installing and configuring, well, just about anything regarding databases, so please bear with me. I'm currently building a couple of ASP.NET MVC 2 sites.  I'm following along with the MVCMusicStore tutorial, and am trying to set up user management using ASP.NET's configuration tool.  The problem is that ASP.NET can't 'see' the database. I have SQL Server 2008 installed on my laptop.  It's the version which is available on the Web Platform Installer (I believe it's Express).  When I try running the aspnet_sqlreg.exe program to set up my user management database, it can't tell that I'm running any version of SQL Server at all.  I get an exception about 'named pipes', and some other things I don't understand at the moment. Obviously, this is all a bit over my head.  Is there an idiot proof guide or tutorial available that describes, step-by-step, how to: 1. Install SQL Server 2008 on a development PC 2. How to configure it to be used by Visual Studio 2010 Professional 3. How to properly upload/modify the db on the production server with what's on the development PC Essentially, all the things that the ASP.NET tutorials gloss over.  Any suggestions, links to documentation, or other nudges in the right direction would be immensely appreciated.

Problems with linked server to Analysis Services (SQL 2008)

  
I have problem with creating linked server from SQL database to Analsis services. BOth services are running on same machine. Operating system is Windows 2008. I create linked server (I use windows authentication and I am administrator on AS):  EXEC sp_addlinkedserver @server= 'OLAP_PRETOKI', @srvproduct = '', @provider='MSOLAP', @datasrc='localhost', @catalog='DWDatabase'  But when I try to test connection I get error (in the event log) and in the error log/dump I get this: 2010-09-03 13:48:28.41 Server Error: 17310, Severity: 20, State: 1. 2010-09-03 13:48:28.41 Server A user request from the session with SPID 57 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory. 2010-09-03 13:48:32.53 spid58 Open of fault log C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\log\exception.log failed. 2010-09-03 13:48:32.65 spid58 Using 'dbghelp.dll' version '4.0.5' 2010-09-03 13:48:32.66 spid58 SqlDumpExceptionHandler: Process 58 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. 2010-09-03 13:48:32.66 spid58 * ******************************************************************************* 2010-09-03 13:48:32.66 spid58 * 2010-09-03 13:48:32.66 spid58 * BEGIN STACK DUMP: 2010-09-03 13:4

Problems with linked server to Analysis Services (SQL 2008)

  
I have problem with creating linked server from SQL database to Analsis services. BOth services are running on same machine. Operating system is Windows 2008. I create linked server (I use windows authentication and I am administrator on AS):  EXEC sp_addlinkedserver @server= 'OLAP_PRETOKI', @srvproduct = '', @provider='MSOLAP', @datasrc='localhost', @catalog='DWDatabase'  But when I try to test connection I get error (in the event log) and in the error log/dump I get this: 2010-09-03 13:48:28.41 Server Error: 17310, Severity: 20, State: 1. 2010-09-03 13:48:28.41 Server A user request from the session with SPID 57 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory. 2010-09-03 13:48:32.53 spid58 Open of fault log C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\log\exception.log failed. 2010-09-03 13:48:32.65 spid58 Using 'dbghelp.dll' version '4.0.5' 2010-09-03 13:48:32.66 spid58 SqlDumpExceptionHandler: Process 58 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. 2010-09-03 13:48:32.66 spid58 * ******************************************************************************* 2010-09-03 13:48:32.66 spid58 * 2010-09-03 13:48:32.66 spid58 * BEGIN STACK DUMP: 2010-09-03 13:4

Problems with SSRS 2008 Install when configuring a back-end database on a SQL Server 2008 R2 environ

  
We are tyring to configure SQL Server Reporting Services (SSRS 2008) not the R2 version with a SQL Server 2008 R2 version of database. We are facing error when the configuration manager within SSRS tries to execute its scripts against the database. Do you think that SSRS 2008 may have trouble using a SQL Server 2008 R2 version as the back-end? Also, what kind of permissions does the ID installing SSRS needs to have on the SQL Server database ?  Not much is available in the documenation or online.

Problems installing SQL Server 2005 Integration Services for Server 2008 R2

  
I am trying to install Microsoft Forefont and i have got a tick on every requirement bar 1. I can't install SWL Server 2005 Integration Services Component. I am running windows Server 2008 R2. I have tried numerous steps such as going into to control panel and adding component but the Integration services is not appearing on the options. Is it actually possible to install 2005 integration services on server 2008 and if so how? Thanks

SQL 2008 R2 problems on a Windows 2008 R2 Enterprise server

  
We are receiving the following error message when installing SQL 2008 R2 on a Windows 2008 R2 Enterprise server. "Unhandled exception has occurred in your application. if you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately. It specialist

Windows 7, SQL Server 2008 Express & VWD 2008 Express Setup Problems

  
Hi I have Windows 7 Home Premium, and Visual Web Developer Express 2008 (which came with SP1) installed. SQL Server 2008 Express never worked - Windows 7 won't allow the Management Studio to be installed and VWD was asking for SQL Server 2005.  Looking on the web, I found advice to try the 32 bit version of SQL Server instead.  This would work with VWD, apparently.  I referred to these instructions (http://download.microsoft.com/download/1/6/3/163A851B-D956-42E9-B426-F5C0EBE6B654/ReleaseNotes.htm) and used the latest links and instructions, but I could not install SQL Server at all - apparently something to do with WOW64... This has been going on for a WHILE and I'm going nuts.  I am reluctant to uninstall VWD and start again, because I had to manually fix a few things, and now it's working...  PLEASE can someone tell me of a working configuration, I have read SO MUCH advice on this, and none works, including those release notes (unless I missed something) :(

Visaul studio 2010 has problems with sql server 2008 R2 64bit

  
Visaul studio 2010 has problems with sql server 2008 R2 64bit or it's my idea?because icant create a new database in my asp.net web site  it says to  go and download it

Column Alias in ORDER BY Clause -- not supported in SQL Server 2005/2008 -- Causes enter migration

  

Hi

We are migrating from SQL Server 2000 to SQL Server 2008 R2 and our web application having thousands of SQL Statement with "Column Alias in ORDER BY Clause ".It is very difficulty to change all statements.

One of article says that SQL Server 2005/SQL Server 2008 not support "Column Alias in ORDER BY Clause and we have to replace with column name" because of this issue If we change Alias name to column name, we have do enter application/integrity testing. it is going to be big deal.

our client Decided to stop migration, Please some help is there any other alternative.

 


SNIVAS

SQL Server 2008 Development problems with Visual Studio 2010 Ultimate uninstall and VS2010 premium i

  

I installed VS2010 Ultimate to test it out but had license for the VS2010 premium only.  After uninstalling ultimate and reinstalling VS2010 premium, my SQL Server 2008 now refuses to connect to my databases stating: 

TITLE: Connect to Server
------------------------------

Cannot connect to Q9300\SQL200801.

------------------------------
ADDITIONAL INFORMATION:

Transaction Problems In SQL Server 2008 R2

  

Hello Forum.

Recently I've been involved in an upgrade project migrating databases from 2000 into 2005; the database then replicates to another company into a 2008 Database.  The processes involved extract data from an Oracle database into the 2005 Database and then transferring the data to the 2008 Database.  a Stored procedeure is then fired on both Servers to integrate the extracted/migrated data into the existing data.

The problem is that now we are getting duplicate data in the 2008 database; essentially the Stored Procedure is supposed to delete existing data if it has been migrated and then replace it with the existing data but it appears as though this isn't happening.  Is anybody aware of any issues surrounding 2008 R2 that could explain this?


Please click "Mark As Answer" if my post helped. Tony C.

Remote access to SSAS (SQL Server 2008): problems with SQL Browser / UDP port 1434

  

Hello everyone,

since last Friday I'm fighting with an issue, which drives me crazy. I tried all the hints I found, but nothing worked. Now I address the community with a hope, that anyone can help me.

So, here is my situation: I have dedicated database server (server'S OS is Windows Server 2008, DBs are (1) SQL Server 2008 SE with all BI components, named instance and (2) SQL Server Express Edition, installed together with VS 2008), joined to our company's domain. My laptop is also in this domain. When I try to connect to the named instance of SSAS on that server from my laptop using SSMS or BIDS, connection fails. When I connect to SSAS on the server itself, it works.

What I did on Friday:

1) I opened all "SQL-server"-related ports in the server's firewall (including UDP port 1434 and TCP port 2382);

2) I tested UDP port with telnet (telnet <IP-address of the host> 1434) - ne response, neither localy nor remote;

3) portqry2 gives following output:
C:\PortQryV2>PortQry.exe -n <IP-address> -p UDP -e 1434

Querying target system called:

 192.168.124.20

Attempting to resolve IP address to a name...

Failed to resolve IP address to name

querying...

UDP port 1434 (ms-sql-m service): LISTENING or FILTERED

Sending SQL Server q

SQL server 2008 on windows 7 64 bit, installation problems.

  

I recently downloaded the SQL Server 2008 Developer (x86, x64) from the msdn aa of my university, I got Windows Professional x64 and I run the setup.exe as administrator but im getting the following error during installation:

Error writing to file: Microsoft.SqlServer.OlapEnum.dll

What can I do?

Thanks.


Problems Installing AKS 1.1 on Windows Server 2008 x64bit

  
Hi all, 

I am trying to install AKS 1.1 (not 2 or 1.0 cuz thats the only release i was able to find on aks.hisoftware.com) on a windows server 2008 x64bit machine. 
 
the toolkit installs in this location: C:\Program Files (x86)\HiSoftware\AKS  .... but nothing in the 12\template\features folder.

the script install_AKSFEAT.bat refers to a feature name "AKS", but i cannot see the feature anywhere in the features folder, and i cannot see a WSP pacakge to deliver this feature to sharepoint!

i event tried to look for the feature manifest to reverse engineer the works of the feature but no luck finding this file in the AKS install folder.

what am i missing here? how can i get AKS 1.1 to install properly and the feature to activate? please HELP!!


- mutaz

Upgrading from VS 2008 to VS 2010 and problems with 64 bit server

  

I upgraded from VS2008 to vs2010. I converted my web project to vs2010.

I built my solution and was able to run it locally on my developmenet machine (32 bit). I publish it to my web server (Windows Server 2003 R2 Enterprise x 64 Edition). Then I got an error message that said -

Could not load file or assembly 'interop.adodb' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I rebuilt my solution changing the target platform to x86. The error is then replaced with

Could not load file or assembly 'ProjectName'or one of its dependencies. An attempt was made to load a program with an incorrect format.

Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable c:\windows\system32\inetsrv\w3wp.exe

It worked when it was 2.0 and it wouldn't use the framework64 folder but just framework.

How do I force my server to run a 32 bit application since I'm assuming I must have other 32 bit dlls resulting in the same error as the interop issue.

 


Problems with Cumulative Update package 6 for SQL Server 2008 R2

  

I have tried to download the Cumulative Update package 6 for SQL Server 2008 R2 several times and the file "427849_intl_i386_zip.exe" appears to be having issues. When I run the self extract gives me error 110.  What is causing this problem?


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend