Technical Article

SQLStackEngine - simulate a character stack

SQLStackEngine - simulate a character stack using a string.  This script was developed specifically to support the operator stack in SQLCalcEngine(also on this site).  However, the implementation is complete enough to stand on its own.There are several functions in the package that correspond to the common stack functions of Push, Pop, Peek, and so on.In […]

You rated this post out of 5. Change rating

2006-12-12 (first published: )

140 reads

Technical Article

SQLCalcEngine - evaluate numeric expression

SQLCalcEngine - evaluate numeric expression similar to the VB eval function.The basic concept is to pass a string containing a numeric expression such as ((2+3)*(4/9)) and receive a numeric value back. The algorithm is based loosely on material found at http://www.arstdesign.com/articles/expression_evaluation.html, as well as material found in the book "Writing Compilers and Interpreters" by Ronald […]

You rated this post out of 5. Change rating

2005-03-31 (first published: )

315 reads

Technical Article

XML Encode UDF

I routinely need to retrieve and package query result sets in an XML package.  The built in functions supported by SQL Server 2000 are effective, but are often more of a pain than a help.  This routine can be used in a simple select statement to XML encode the contents of a column during the […]

You rated this post out of 5. Change rating

2003-10-14

236 reads

Blogs

My 2024 in Data: Health and Workouts

By

This is my last week of the year working (I guess I come back...

My 2024 in Data: Reading

By

This is my last week of the year working (I guess I come back...

Book Review – Agile Data Warehouse Design

By

I recently read the book Agile Data Warehouse Design – Collaborative Dimensional Modeling, from...

Read the latest Blogs

Forums

Need ADF pipeline suggestion to copy 1 million files

By varunkum

I have an ADF pipeline that copies Files from source to destination. Both Source...

Backup issues

By Bruin

I''m running a stripped backup (2 files) to a Network share. It's a 32gig...

Function Defaults

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Function Defaults

Visit the forum

Question of the Day

Function Defaults

I have created this function in SQL Server 2022:

CREATE FUNCTION dbo.AddInt (@one INT, @two INT = 1) RETURNS INT
AS
BEGIN
    RETURN @one + @two
END
How can I call this and invoke the default value for @two?

See possible answers