Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global Function in MS SQL 7.0

Status
Not open for further replies.

KelvinIsaacDbase

Programmer
Dec 16, 1999
1
GB
Has anyone had any joy creating the SQL equivalent of a Visual Basic global function.<br>
I need to create a function which can work out someones age from their date of birth, working in a similar way to the DATEDIFF(Year,,) Function. Its achieveable in a SP with a fair amount of code but I want to be able to use it across many databases and stored procedures, without storing the value in a table, using as little code as possible.
 
You can still use a stored procedure.<br>
Just compile it in the Master database.<br>
This will give you access from any database on the <br>
server.<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top