Is there a way to retrieve datatypes from stored procedures?
15 pts.
0
Q:
Is there a way to retrieve datatypes from stored procedures?
I have used the following simple query to retrieve datatypes from sql 2000 tables.

select TABLE_NAME,
COLUMN_NAME,
DATA_TYPE,
CHARACTER_MAXIMUM_LENGTH
from <tablename>.information_schema.columns
where table_name = '<tablename>' and column_name = '<columnname>'

Is there a way to retrieve datatypes from stored procedures?
ASKED: Jan 6 2009  8:34 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
46795 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
What do you mean by datatypes from stored procedures?
Last Answered: Jan 7 2009  5:28 AM GMT by Mrdenny   46795 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Carlosdl   29855 pts.  |   Jan 7 2009  7:56PM GMT

Are you talking about the datatypes of the stored procedure’s parameters ?

 

TlogP   15 pts.  |   Jan 8 2009  2:26PM GMT

I need to know what datatype i.e. char, varchar, text, nchar…. the SP is passing to the database table. I am able to view this in QA but I have about a 1000 db i need to check on. I wanted to write something like what i posted to do this. what i posted returns the datatype or metadata for a table.

thanks for your help.

 

mrdenny   46795 pts.  |   Jan 9 2009  7:00PM GMT

The datatypes that the stored procedure is passing to the table will be what ever datatypes the table is setup for. You can’t exactly stuff a varchar value into an INT column.

 
0