Skip to main content

Posts

Showing posts from 2012

Minimize, Hide or remove the Quick Launch in Project Server 2010 or SharePoint

On a standard Project Server or SharePoint web page there is a quick launch in the left side of the screen. It is not always desirable to view this side bar to the user and sometimes you just want to hide it and let the user restore it when he needs it. Remove Quick Launch If you just want to remove the quick launch on a SharePoint web page you can add the following script in a content editor on the webpage (see how to add a content editor in the next section). < style type ="text/css">            #s4-leftpanel {    display : none } .s4-ca {    margin-left : 0px } </ style > But if you want to let the user be able to view it on command you can do it by adding Javascript to the content editor web part as described below. Hide Quick Launch This method only works for Project Server , SharePoint does not have the minimize button on the quick launch unfortunately. If y...

Create SQL Table from View

Often I need to create a staging table to cache data from a view in, this can be quite timeconsuming because you have to find the datatype of each column in the view. Today I found a way to do this very easily in MS SQL. If you have a view "View1" and want to create a table "Table1" all you have to do is to execute the following script: SELECT * INTO Table1 FROM View1 MS SQL identifies all the rows and generates a table, however it cannot see the datalengths, so if the view is selecting data from a table with a column of datatype nvarchar(255) but it only contains one value with the text "texttext" then the new table will get the datatype nvarchar(8). All data from the view is also copyied.