Viewing 6 posts - 1 through 6 (of 6 total)
Hope this helps you..
SELECT TableName, COUNT(*) [Dependency Count]
FROM (
Select Distinct
o.Name 'TableName',
op.Name 'DependentObject'
From SysObjects o
INNER Join SysDepends d ON d.DepId = o.Id
INNER Join SysObjects op...
September 26, 2012 at 12:56 am
Try with the following
Use "Your-DBNAME"
GO
SELECT DISTINCT o.name ,o.xtype
FROM syscomments c
INNER JOIN sysobjects o ON c.id=o.id and o.type='p'
WHERE c.TEXT LIKE '%SEARCH_TEXT%'
PS: type='p' is to retrieve only stored procedures from sysobjects.
Thanks
Kivan 😉
August 6, 2012 at 12:32 am
--------- some logic
--------- some logic
where empid=(select empid from #emp where deptid=2)
In this case as i said you can insert it (select empid from #emp where deptid=2) to an temptable so...
July 30, 2012 at 10:23 pm
Probably you can assign this resultset to a table variable or a temp table and can make use of the same later when required.
July 30, 2012 at 9:59 pm
Hi,
You can use this Query to add an character in between the value of an existing field
Select STUFF(ColumnName,4,0,'.') from TableName
Hope this helps.. 😉
Thanks
Kivan.G
July 18, 2012 at 5:12 am
As per my understanding Hope the following query'd return the No.of Reported Items of each Facility
Select distinct F.Facility,Count(ReportedItem) [No.of.Items] from ReportItems R
RIGHT Join Facility F on R.Facility= F.Facility
Group By...
July 18, 2012 at 4:43 am
Viewing 6 posts - 1 through 6 (of 6 total)