Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Including Execute in a SELECT statement

Author  Topic 

Stef
Starting Member

5 Posts

Posted - 2001-11-29 : 05:15:41
Hi,

Is it possible to use a call to a store proc in a SELECT statement like this :

SELECT ID, Amount, (exec MY_PROC Amount) FROM Table

This store proc would produce a result based on the value of the Amount column.

Thanx

Stephane

LarsG
Constraint Violating Yak Guru

284 Posts

Posted - 2001-11-29 : 05:27:20
You can create a function for that purpose.

Look up CREATE FUNCTION in BOL

Go to Top of Page

Stef
Starting Member

5 Posts

Posted - 2001-11-29 : 05:57:09
quote:

You can create a function for that purpose.

Look up CREATE FUNCTION in BOL





Apparently this is exactly what I am looking for. But is it possible it doesn't exist with SYBASE ? At least that's what my DBMS tells me ...


Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2001-11-29 : 07:07:21
I think you might have better luck with a Sybase site. We specialise in SQL Server here.

I think Sybase has some newsgroups you might want to check out.

Damian
Go to Top of Page
   

- Advertisement -