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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Defined Function Call in Select Statement

Status
Not open for further replies.

ljspop

Technical User
Feb 10, 2001
35
US
Is it possible in SQL Server 7 or 2000 to embed a user defined function
call in an SQL statement. In Oracle we can create a PL/SQL function and
make it available for use in straight SQ - just wondering if there is anything
similar in SQL Server.

Thanks in advance.

Bob Bob Lowell
ljspop@yahoo.com

 
I was asking the same question too :)

Andel
maingel@hotmail.com
 
As far as I know User Defined Functions are available in 2000 but not in 7
 
Yes, it can be done in 2000. Not in 7.0, though.
the syntax is:
Create Function blah(variable as datatype)
as
select * from table where datacol = variable
go

(you can use anything you want for the other stuff)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top