Click to See Complete Forum and Search --> : Creating Functions


amarjitamarNew
May 23rd, 2005, 12:45 AM
Dear All,

Hi everyone,

I would like to know whether we can write functions in SQL Server 7.

The point i like to know that can i write functions that do not have any relation with manupulating database but will do some other tasks. For example Adding two number that is supplied to the function.

It is possible. Please do tell me.

regards
Amarjit

Klymer
May 23rd, 2005, 05:51 AM
Dear All,

Hi everyone,

I would like to know whether we can write functions in SQL Server 7.

The point i like to know that can i write functions that do not have any relation with manupulating database but will do some other tasks. For example Adding two number that is supplied to the function.

It is possible. Please do tell me.

regards
Amarjit


of course it is. have a look at 'user defined functions' in your EM.
you find those in your databases, where you also have your tables and views and sps.

for further instructions refer to bol.

Krzemo
May 30th, 2005, 07:34 AM
U cannot create user defined functions in Ms SQL Server prior to version 2000.


However U can create stored procedures with output parameters to do that (but, on the other hand, U cannot use it directly in SELECT - the way functions work)

Best regards,
Krzemo.