How to retrieve data from two or more tables Microsoft SQL Server Management Stu
ID: 3534395 • Letter: H
Question
How to retrieve data from two or more tables Microsoft SQL Server Management Studio 2012
Use the UNION operator to generate a result set consisting of three columns from the Orders table: ShipStatus A calculated column that contains a value of SHIPPED or NOT SHIPPED OrderID The OrderID column OrderDate The OrderDate column If the order has a value in the ShipDate column, the ShipStatus column should contain a value of SHIPPED. Otherwise, it should contain a value of NOT SHIPPED. Sort the final result set by OrderDate.Explanation / Answer
If you have MS Access, you can simply export directly to your SQL Server data base by creating an ODBC link. You will have to export the tables from MS access one at a time but once the ODBC link has been created it takes only seconds to export individual tables. Before you start exporting make sure you have a data base in SQL where you want to export to. Open your data base in access Right click on the table you want to export Select export A dialog box opens... at the bottom of this dialog box there is a "Save as Type" drop down box select it and scroll to the bottom you will find "ODBC Databases () " select it Give your table a new name, or leave as is, if it that suits you.... Click OK A Select Data Source dialog box opens..... Click the "New" button A create new data source dialog opens Scroll to the bottom of that box and select SQL Server click NEXT give your data source a name...... what ever you like. click NEXT.... click FINISH a 'Create New Data Source to SQL Sever' dialog box opens Give your connection a description select or type the name of your server in the Server drop down box Click NEXT...... Click NEXT...... check the 'change the default data base to' check box select the data base where you want the export your table to. Click NEXT.... click Finish. That's all. Now you can select each table from you access data base then select Export....... ODBC databases () now you can select the data source you created then click OK return to SQL Management Studio Express and if it was already open be sure to refresh or you won't see the newly imported table. Hope this is helpful
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.