|
Posted by Erland Sommarskog on 02/02/06 01:23
lemes_m@yahoo.com (lemes_m@yahoo.com) writes:
> CREATE PROCEDURE dbo.SPRazduznicaZM
> (@Datum datetime,
> @Nalog smallint)
> AS SELECT FCNabavneCijeneZM.RobnoObjekat,
>...
> FROM dbo.FCNabavneCijeneZM(@Datum) FCNabavneCijeneZM LEFT OUTER
>...
>
> I would like to set parameter
> @Datum=dbo.TBLNaloziProizvodnjeOs.NProDatum
>
> What's right way to do this?
It's not clear to me what you mean. My guess is that in the call
to the user-defined table function, you want to pass a column as the
parameter, rather than a variable.
On SQL 2000, this is not possble.
On SQL 2005, you can use the new CROSS APPLY operator.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|