How to import data from Excel file to SQL Server:

Standard

In this post, we would see how to import data from Excel file to SQL Server using Import and Export Wizard, we would import data from four excel worksheets to SQL server. Here are the steps:

1) Right click the Target Database > Tasks > Import Data to open the SQL Server Import and export wizard

import data ssms sql server import export

2) select the Data Source. In this case, Excel file. You would select the worksheets to fetch data from later, for now – select the excel file as shown below:

import data ssms sql server import export

3) choose the Target Database:

choose the target database import and export systems

4) Select the tables (in our case- worksheets) or specify a query. For the purpose of this demo, we would go with “copy data from one or more table or views” option:

 specify table copy or query

5) Select the worksheets from the Excel file and also specify the tables in the target systems. If the tables in the target database are not already created, then would be created by this wizard:

sql server map source and targetsql server map source and target

6) You have the option of running this wizard immediately or you have the option of creating a SSIS package and then run it later. For the purpose of this post, we would select Run Immediately

7) Review the information and click Finish

sql server review the complete wizard

8) After successful execution:

8 sql server import export execution was successful

Conclusion:

In this blog post, we saw how to import data from Excel file to SQL server.

 

Back to basics: What’s CRUD?

Standard

Some year’s ago – I got introduced to SQL. At that time, I recall, I was sitting in a lab and one of the first exercises we did was to create a table in a database and adding data in it. In next lab, we ran SQL commands that updated records and deleted few. After we’re done – our instructor told us what we learned were the most basic programming functions i.e CRUD operations

CRUD stands for Create, Read, Update and Delete.

C: Create

R: Read

U: update

D: delete

Let’s see the SQL equivalent of CRUD operations:

OperationSQL
CreateINSERT
ReadSELECT
UpdateUPDATE
DeleteDELETE

Is the concept of CRUD just applicable to SQL?

No. in fact, if you start learning programming or web development – one of the first things that you get to learn is how to run CRUD operations with that particular language.

Conclusion:

In this blog post, I documented four (4) basic programming functions i.e. Create, Read, Update and Delete.

How I installed StreamInsight 2.0 on my demo machine:

Standard

I installed StreamInsight 2.0 on my demo machine today and so I thought I would document the process.

Before we begin, few references to existing documents on the interwebs: Official documentation about Installation is here: http://msdn.microsoft.com/en-us/library/ee378749.aspx and Introduction to concepts of StreamInsight can be accessed via the following resources:

1)      MSDN documentation: http://msdn.microsoft.com/en-us/library/ee391416.aspx

2)      Pluralsight: http://blog.pluralsight.com/2012/01/17/free-streaminsight-training/

3)      SQL server central article: http://www.sqlservercentral.com/articles/StreamInsight/69208/

4)      A channel 9 video pointed out by Johan Ahlen: http://joinsights.com/2011/05/22/great-streaminsight-presentation-by-torsten-grabs/

Now, here are the steps that I took to install StreamInsight on my demo machine:

1)      I located the StreamInsight installer inside the SQL Server 2012 Developer edition setup that I had:

1 Installing streaminsight sql server developer edition

Note that even though StreamInsight is licensed with SQL Server – It is different “software” that solves different technical problem(s). And note that StreamInsight does not have dependencies on SQL Server. It is a separate install.

2. On the Instance Configuration page, I added “StreamInsightInstaller” as the instance name. This is the first instance of StreamInsight that I am installing on my demo machine

3. On next dialog box, I added the product key that I have for SQL Server Developer edition. You also have the option to activate 180 day trial.

4. Then specify the StreamInsight service and group settings

5. Click on Install on next dialog box

6. You would also need to install the SQL compact edition. To do that, I navigated to C:Program FilesMicrosoft StreamInsight 2.0Redist

Note that, if you have chosen the x64 version then you would have to first install the x86 version of SQL Server compact and then the x64 version of SQL Server Compact.2 stream insight install sql serve compact edition

7. Now installation is complete at this point.

8. If the StreamInsight Service is not started, then go to services and start it.

3 install streaminsight service not started

In services: Right click > Start:

4 windows service streaminsight start

9. Now, You can run samples. To access them you can go to Start > all programs > StreamInsight Samples

5. stream insight samples installation

Conclusion

In this blog-post, we saw how to install StreamInsight 2.0 on your machine.

Where’s the Formula Bar in Excel 2013?

Standard

I was playing with Excel 2013 and wanted to see the Formula Bar for something. Turned out, by default, It was hidden and so I learned how to unhide it. Here are the steps:

1. Go to View Tab

2. Check the “Formula Bar” check-box:

view bar formula bar unhide excel 2013

3. And it’s unhidden now!

view bar formula bar hide unhide excel 2013

Conclusion:

In this blog-post, we saw how to unhide the formula bar in Excel 2013.

what are the end – to – end processes for developers to build out a Master Data Services 2012 solution?

Standard

I recently completed an end to end tutorial that taught me basics of Master Data Services 2012. And I thought I would take what I’ve learned and create a diagram for reference that helps developers see end – to – end processes that are involved in building out a SQL Server Master Data services 2012 solution. So here it is:

SQL Server 2012 Master data services steps

Migrating Data from SQL server to SQL Azure using BCP

Standard

BCP is an ideal straightforward command prompt driven tool to push data from one table to another similar table. This makes it an excellent tool to carry out data migration from SQL server to SQL Azure. And here is a blog post: Migrating SQL server Data to SQL Azure using BCP << Paras Doshi, i have written to show how we can migrate SQL server data to SQL Azure using BCP tool.