Need Assistance With Defining Column Value in a View In view design I wish a row to calculate the UnitDiscountAmt by multiplying the UnitPrice * DiscountRate if DiscountRate >0, Else just show the UnitPrice. Now if I were doing this in Access I would IIf([DiscountRate]=0, [UnitPrice], [UnitPrice]*[DiscountRate]. How would I write this in the view? ... 26 Mar 2010 12:01
Best way to format errors with raiserror? What is the best way to format an error when using raiserror? I need to be able to make it easy to unpack the error package on the client so it can get all info needed. Or is the SQLException good enough for catching sql errors on the client? This is with C#/VB 3.0. ... 26 Mar 2010 01:26
Visual Studio 2008 database project or just use SSMS? What would be better to use? Visual Studio 2008 database project or just use SSMS? ... 25 Mar 2010 09:09
Database, SQL Server, .NET SQL Server Management Objects (SMO) are objects designed for programmatic management of Microsoft SQL Server. We can integrate SMO into any .NET based applications. SMO is also compatible with SQL Server version 7.0, SQL Server 2000, and SQL Server 2005, which makes it easy to manage a multi-version environment. ... 25 Mar 2010 09:09
How to find out what rows successfuly/failed to insert I have to write code that needs to log down what rows were inserted as well as what ones failed to insert. I use a merge statement to insert/update/delete multiple rows at a time. How would I figure this out? ... 26 Mar 2010 05:48
Returning status/error codes as well as resultsets from stored procedure. What's the best way to return error or status codes when you also return a resultset? ... 25 Mar 2010 08:00
function or View We have a procedure that is calling a function as a table Select * from fnTerm (@Term,1) ******************************** ALTER FUNCTION [dbo].[fnTerm] (@Id int, @ByList BIT) RETURNS TABLE AS RETURN SELECT PId, TId, CategoryType,Name FROM Term UNION SELECT PId, TId,... 24 Mar 2010 22:47
Always rounding up How do you always round up? I want to to store a value to the 4th decimal place but don't want to round down select round(.333888888,4) -- Want to return .3339 select round(.333811111,4) -- Want to return .3339 not .3338 Thanks ... 25 Mar 2010 06:53
DBTYP.NET Studio 2010 - Fastest Database Comparison Suite Released DBTYP.NET Studio 2010 - Database Comparison Suite Released Vienna, Austria - March 8, 2010 Today, BYPsoft announced the availability of DBTYP.NET Studio 2010, the newest version of the cross-database comparison tool that compares SQL Server, MySQL and Oracle databases (schema and data). DBTYP.NET Studio 2010 is a... 24 Mar 2010 15:53
Stored Procedure skipping commands Hi, I have a user with a stored procedure in 2008 SP1 that appears to be ignoring the query so no rsults are returned. When called from code he receives no record set and when I call teh SP from managements studio, I get 'Command(s) completed successfully.' The stored procedure basically consists or a declare, a ... 24 Mar 2010 15:53 |