Monday, July 26, 2010

Find all The User Defined Procedures in Sql

There is two ways to get the result:-
1. Using Comination of System define Procedure table and Schema table

Select * From sys.procedures As P
Inner Join sys.schemas As S On S.schema_id = P.schema_id
Where P.type = 'P' And is_ms_shipped = 0 And Not Like 'Sp[_]%diagram%'

2. Using System define Object table
Select * From sys.objects
Where type = 'P' And is_ms_shipped=0 And name Not Like 'Sp_%diagram%'

Note:- is_ms_shipped Equals Zreo Means Show all the User defined events

Tuesday, July 20, 2010

Validate number in textbox using Javascript

function fnSubmit(){
var str = "ab126";
var ValidStr = "0123456789.";
var flag;
for(var i=0;i if(ValidStr.indexOf(str.charAt(i)) > 0)
flag = true;
flag = false;