Skip to main content

Posts

Showing posts from June, 2013

jQuery Menu

I was just surfing stackoverflow and found a question about Navigation Menu. Just picked the solution from there and modified a bit to get a sleek one around. And here is the recipe: Create a Place Holder Div for the navigation menu. Now add some divs(Menu Items) to this container.  This div will work as container for the Main Menu and Submenu under it.  Now Add a paragraph and a UL - LI structure under each of Menu Item Div created in last step. We can add some a-tags in LIs to work as a link. I have added some simple css style to get it noticeable. You can apply yours to make it handsome. Thats all to do with HTML. Home option 1 option 2 option 3 option 4 option 5 Shows option 1 option 2 option 3 option 4 option 5 Search option 1 option 2 option 3 option 4 option 5 Ok so now we just have to add some jQuery that will Do some animation for our menu. We are using all around

How To Find An Object By Text In SQL Server

How to search for a 'text' in SQL Server. So here is the magic query : You have to declare a sql variable @Search and set this variable as our text. This query will get you all the objects under the selected database containing the "text" set in sql variable. And also this will get you the object type. So you are good to know if this is stored procedure or view or anything-else. DECLARE @ Search varchar ( 255 ) SET @ Search = '[10.10.100.50]' SELECT DISTINCT     o . name AS Object_Name , o . type_desc     FROM sys . sql_modules        m         INNER JOIN sys . objects  o ON m . object_id = o . object_id     WHERE m . definition Like '%' +@ Search + '%'     ORDER BY 2 , 1 Here is the output of the query looks like: Find By Text in SQL Server