2012-11-16

TSQL - Quickly copy a linked server table


select
       *
into
       DATABASE.dbo.TABLE1
from
       openquery(
              LINKED_SERVER_NAME
              , '
                     select
                           *
                     from
                           TABLE2
                     where
                           PeriodID=201211
              '
       )
;


2012-11-13

TSQL - Creating a view that uses a CTE


create view vTest1 as
with v1( a )
as
(
       select 1 as a
)
select
       *
from
       v1
;


EXCEL - Save all open workbooks macro

This macro will save all open non-read-only workbooks.


Sub x()
    Dim w As Workbook
    For Each w In Workbooks
        If Not w.ReadOnly Then
            w.Save
        End If
    Next
End Sub





2012-11-09

Ubuntu 12.04 - Installing and registering a DVD decryption library

I couldn't open any DVD... this fixed it. Run the following two commands on terminal. Don't worry if the first step tells you that you already have the library, as the second step registers it properly.


sudo apt-get install libdvdread4
sudo /usr/share/doc/libdvdread4/install-css.sh

Reference, source:
http://askubuntu.com/questions/109103/how-do-i-install-a-dvd-decryption-library