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
 SQL Server Development (2000)
 Dynamically declaring stored procedure parameters according to table data types

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-22 : 10:05:28
Thomas writes "Hello,

having recently switched from Oracle and PL/SQL, I have problems finding the MSSQL equivalent of %TYPE which was in PL/SQL.

For example, when declaring a parameter for a stored procedure, you can, instead of declaring a static type, define which table and column to extract the data type from and define your parameter likewise, thus saving maintenance time etc. when you change the column types of the table, the stored procedures will still work.

I.e., DECLARE variable Customer.FirstName%TYPE.

Thanks in advance,

Thomas"
   

- Advertisement -