SQL Server 2014 Creating Views in Databases Tutorial Videos (1) - PowerPoint PPT Presentation

View by Category
About This Presentation
Title:

SQL Server 2014 Creating Views in Databases Tutorial Videos (1)

Description:

learn Creating views in SQl server 2014 databases , importing data from microsoft excle file to sql server databases, and exporting sql server databases with clear structured SQL Server 2014 Creating Views in Databases Online Tutorial by catch experts. – PowerPoint PPT presentation

Number of Views:79

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: SQL Server 2014 Creating Views in Databases Tutorial Videos (1)


1
CATCH EXPERTS
https//www.catchexperts.com
http//www.courseing.com
2
SQL Server 2014 Creating Views in Databases
Tutorials Videos for Beginner by
3
Highlights
  • Creating a view
  • Importing and Exporting Data

4
Creating a view
  • Creating views in SQL Server databases can be
    done two ways
  • Using Management studio
  • Transact-SQL
  • Creating a view using management studio is as
    follows
  • In Object Explorer, expand the database where you
    want to create your new view.
  • Right-click the Views folder, then click New
    View.
  • In the Add Table dialog box, select the element
    or elements.

5
Creating a view
  • Click Add, then click Close.
  • In the Diagram Pane, select the columns or other
    elements to include in the new view.
  • In the Criteria Pane, select additional sort or
    filter criteria for the columns.
  • On the File menu, click Save view name.
  • In the Choose Name dialog box, enter a name for
    the new view and click OK.
  • If followed these steps correctly, your view
    would have been created.

6
Creating a view
  • Creating database view using Transact-SQL is
    follow as
  • In Object Explorer, connect to an instance of
    Database Engine.
  • On the Standard bar, click New Query.
  • Copy and paste the following example into the
    query window and click Execute.
  • Code USE AdventureWorks2012
  • GO
  • CREATE VIEW HumanResources.EmployeeHireDate

7
Creating a view
  • SELECT p.FirstName, p.LastName, e.HireDate
  • FROM HumanResources.Employee AS e JOIN
    Person.Person AS p
  • ON e.BusinessEntityID p.BusinessEntityID
  • GO -- Query the view
  • SELECT FirstName, LastName, HireDate
  • FROM HumanResources.EmployeeHireDate
  • ORDER BY LastName

8
Importing and Exporting Data
  • Importing and exporting data from SQL server
    databases can accomplished by SQL Server Import
    and Export Wizard. Exporting data done in
    following way
  • Open SQL Server Management Studio.
  • Enter the details of the server you wish to
    manage.
  • Click Connect to connect SSMS to the server.
  • Expand the Databases folder under the name of the
    server.
  • Right-click on the name of the database to select
    Export Data and Click Next.

9
Importing and Exporting Data
  • 6. Select SQL Server Native Client as your data
    source.
  • Choose the name of the server that you want to
    export data from in the Server.
  • confirm the authentication data and select
    corresponding authentication options.
  • Select the name of particular database you wish
    to export data from the data base drop down box
    and Click Next to continue.
  • Choose Flat File Destination from the Destination
    dropdown box.
  • Provide a file path, name ending with .txt in
    the File name text box, and Click Next.

10
Importing and Exporting Data
  • 13. Click Next to accept the Copy data from one
    or more tables or views option on the Specify
    Table Copy or Query screen and Click Next to
    continue.
  • 14. Click Next to move past the Select Source
    Tables and Views screen.
  • Click the Finish button to skip ahead to the
    verification screen
  • After reviewing the SSIS actions that will take
    place, click the Finish button.
  • When the export completes, verify that the file
    exists in your selected location.  You may open
    it using any text editor.

11
Importing and Exporting Data
  • Importing data from Excel file to SQL database
    server is as follows.
  • Open SQL Server Enterprise Manager
  • Right-click on the appropriate server
  • Select Import Data
  • Run through the wizard.
  • Click Next on the first screen.
  • Choose "Microsoft Excel " as your data source.
  • Enter the path to the XLS file and click next.
  • Enter the connection details for your database
    and click next.

12
Feedback
Like It ? Hate It?
We would love to hear from you whatever you think
about the course.
Click HERE to share what you think!
13
Thank you
Thank You for Watching SQL Server 2014 Creating
Views in Databases Tutorials Videos for
Beginner by
http//www.courseing.com
About PowerShow.com