Viewing 15 posts - 1 through 15 (of 23 total)
[font="Courier New"]select 100 / (100 / 108)[/font]
is a similar example that yields "Divide by zero error encountered" - a strange backdoor to getting this error.txtPost_CommentEmoticon(';-)');
May 27, 2015 at 2:00 am
I tried the method described in the link for changing from Tabular to Multidimensional, in SQL Server 2014. Worked great - thanks.
August 28, 2014 at 3:41 pm
-- Create sample data
-- Each Poster gets their name (I'm pretending their name is unique),
-- a posting ID, a flag to confirm their post has an...
December 7, 2013 at 7:38 pm
Measure Up provides the sample questions that come with the exam Training Kit series of books. These 150 to 200 sample questions are a good complement to the book content....
March 18, 2013 at 9:10 pm
Thanks Tom - I have noted that the ROUTINE_DEFINITION that SQL Server seems to be constrained only to the FIRST 4000 characters, rather than 4000 character "chunks". This makes...
October 4, 2011 at 11:52 am
SQL Server 2005 has some improved ways to search the text of a stored procedure, addressing the SQL Server issue of the difficulty in finding search strings that are split...
April 1, 2007 at 11:28 pm
Hi Mike,
I noticed a typo in a bit of the code - see correction below
CREATE PROCEDURE ValuesForView1
AS
INSERT INTO #tmp1 -- this temp table is created ALWAYS in the...
March 2, 2007 at 4:35 pm
How about this approach? Assume this is a stored proc that will simulate the output of View1, which itself references View2, which itself references View3
CREATE PROCEDURE CallingProcForView1
AS
-----------
if not exists (select * from sysobjects...
March 1, 2007 at 11:06 pm
hmm, you also might want to consider adding a couple of indexes to your view - you need to start with a unique clustered index, but then you could add...
February 28, 2007 at 9:40 pm
Are the table names and field names consistent for the different databases? Are the inconsistencies limited to the field sizes and field values?
February 28, 2007 at 1:01 pm
Using a view in a stored proc that is then filtered based on a parameter value from the stored proc "encourages" SQL Server to generalize the solution - ie fully instantiated the...
February 28, 2007 at 12:48 pm
-- First, simulate your table...
DECLARE @Person TABLE
( Address VARCHAR(29), Name VARCHAR(20) )
INSERT INTO @Person (Address,Name)
VALUES ('NewYork','abc')
INSERT INTO @Person (Address,Name)
VALUES ('CA','DEF')
-- Next,...
February 26, 2007 at 2:31 am
You will need to also check the column type, as you can't expect to find empty strings in numeric fields, nor would SQL Server be happy if your code looked...
February 21, 2007 at 3:56 pm
SELECT distinct t1.*, t2.*
FROM @table1 t1
LEFT OUTER JOIN @table2 t2
ON t1.PrintKey = t2.PrintKey
will also get rid of duplicate rows - but like John says, sample table definitions...
February 20, 2007 at 11:19 pm
To express the difference between two dates in days...
DATEPART(dd,(DATEDIFF(@startdate,@enddate)))
or
DAY(DATEDIFF((@startdate,@enddate))
Both are equivalent - it follows the SQL tradition of there always being more than one way to solve a problem...
February 20, 2007 at 11:08 pm
Viewing 15 posts - 1 through 15 (of 23 total)