stnkyminky
Programmer
I'm using the following query to pull the table name and created date for tables in a database. I would also like to display the number of records in each table.
Here is the function I wrote but it didn't work....for obvious reasons.
I was hoping to create a function that would return the number of rows so I could display my information inline.
Can anyone provide a creative solution?
Thanks
Scott
Programmer Analyst
<{{><
Code:
select sysobjects.name, crdate from sysobjects where name like 'tbl%'
Here is the function I wrote but it didn't work....for obvious reasons.
I was hoping to create a function that would return the number of rows so I could display my information inline.
Code:
Create FUNCTION fn_rows(@sTable as varchar(8000))
RETURNS int
AS
BEGIN
Declare @RowCount int
Select @RowCount = count(*) from @sTable
RETURN @RowCount
END
Can anyone provide a creative solution?
Thanks
Scott
Programmer Analyst
<{{><