SSIS and Sql Server Journey

Personal Notes of Sarabjit Singh and Bhavpreet Singh

Quick Tips

on March 18, 2013

1. GUID Using SQL Server

You can generate a GUID using SQL Server using the following T-SQL statement:

 SELECT newid()

This statement generates a new GUID and displays it in the output window.

2. Get current time after removing special characters


SELECT REPLACE(CONVERT(VARCHAR, GETDATE(), 14),':','')

Above code will return ‘221320687’ for date ‘2013-03-19 22:13:20.687’

3. Converting strings to dates in derived column component: SSIS

Convert from yyyymmdd to date data type

4. Cmd Prompt : Shortcuts: ssms, sqlwb – did they confused you yet?

Check following link to clerify:

http://www.silverlighthack.com/post/2008/08/02/sql-server-2008-quick-fact-new-ssms-shortcut.aspx

(DT_DBTIMESTAMP)(SUBSTRING([date string], 1, 4) + "-" SUBSTRING([date string], 5, 2) + "-" + SUBSTRING([date string], 7, 2))

4. difference between look up and merge join — SSIS

http://consultingblogs.emc.com/jamiethomson/archive/2005/10/21/SSIS_3A00_-A-case-study-of-using-LOOKUPs-instead-of-MERGE-JOINs.aspx

http://beyondrelational.com/modules/2/blogs/106/Posts/14438/ssis-playing-around-with-lookup-and-merge-join.aspx

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: