Query for Geting dependent tables of a stored procedure

17 Dec

In MS SQL Server 2008, you may get the table names dependents by a stored procedure using the following query


,(SELECT name FROM sys.schemas WHERE schema_id=t.schema_id) AS schemaName

FROM  sys.tables t

WHERE  t.object_id in (SELECT depid

FROM sys.sysdepends

WHERE id In (SELECT s.object_id FROM sys.procedures s WHERE name=’SPName‘))

SPName  is the name of  stored procedure.

Th output will be the table name and its schema. Happy querying .. 🙂


Best DB

15 Nov

Avoid iframe scrolling issue Using Jquery

15 Nov

In my asp.net web application am using iframe. But i faced some scrolling issues. ie, some of my pages are large in size, then there will be scroll bars for browsers and iframe. Am stuck in this issues for long time. At last i find out a solution using jquery. I fix browser’s scrolling off and set height and width of iframe related to browsers height and width, and then set scroll bars for iframe. Here I am success with the following jquery,

var newheight = $(document.body).height();

var newH = parseInt(newheight) – 90;

var newHI = parseInt(newheight) – 130;

var width = $(document.body).width();

var newwidth = $(‘#LeftPane‘).height(newH).width();

var newW = parseInt(width) – (parseInt(newwidth) + 30);


Here LeftPane is div in my page where all menus resides. I just wants to set scroll bar for that too based on browser’s height and width.

Query for getting SP associated with a table

4 May

Here is the query for getting all stored procedure name associated with a particular table in SQL server 2008.

EXEC sp_depends tableName

This query gives all the stored procedures associated with the table ‘tableName’

Query for getting Table structure in MS SQL Server

25 Feb

Here is the query for getting the structure , properties and values of a table in MS SQL

exec sp_help tablename

Where ‘tablename’ is the name of table.

Preventing Your Web Page being load in an IFRAME

29 Dec

<script type=”text/javascript“>
if (top.location.href != self.location.href)
top.location.href = self.location.href;


16 Nov

FLEX GRID tutorial