首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
You are the administrator of a SQL Server 2000 computer in your company’s personnel department. Employee data is stored in a SQL
You are the administrator of a SQL Server 2000 computer in your company’s personnel department. Employee data is stored in a SQL
admin
2009-05-19
54
问题
You are the administrator of a SQL Server 2000 computer in your company’s personnel department. Employee data is stored in a SQL Server 2000 database. A portion of the database schema is shown in the exhibit.
You want to create a text file that lists these data columns in the following format title, FirstName, LastName, WorkPhone, PositionName, DepartmentName.
You want to create the text file as quickly as possible. You do not expect to re-create this file, and you want to avoid creating new database objects if possible.
What should you do?
选项
A、Use the bcp utility to export data from each table to a separate text file. Use format files to select the appropriate columns. Merge the data from each text file into a single text file.
B、Create a view that joins data from all three tables include only the columns you want to appear in the text file. Use the bcp utility to export data from the view.
C、Create a SELECT query that joins the data from the appropriate columns in the three tables. Add an INTO clause to the query to create a local temporary table. Use the bcp utility to export data from the local temporary table to a text file.
D、Create a SELECT query that joins the data from the appropriate columns in the three tables. Add an INTO clause to the query to create a global temporary table. Use the bcp utility to export data from the global temporary table to a text file.
答案
D
解析
Explanation: As the columns that we want in the text file are on different tables in the database, we would have to combine the column into a table or view. Because we will not need to reproduce the file, we can we can combine the column from the various tables into a global temporary table by using the SELECT INTO statement. Then we use the bcp utility to export the data from the global temporary file to a text file.
Note: Temporary tables are not stored in the current database; they are stored in the tempdb system. There are two types of temporary tables: local temporary tables, which are visible only to the connection that created them, and global temporary tables, that are visible to all connections. If global temporary tables are not dropped explicitly before the connection that created them disconnects, they are dropped as soon as all other tasks stop referencing them. No new tasks can reference a global temporary table after the connection that created it disconnects.
The bcp utility copies data between an instance of SQL Server 2000 and a data file in a user-specified format. It can be used to transfer data from a SQL Server table to a data file for use in other programs. Furthermore, data can also be transferred out by specifying a SELECT statement. The bcp utility can use global temporary tables, but not local temporary tables.
Incorrect Answers:
A: Creating a global temporary table by using the SELECT statement and using the bcp utility to export data from that table would require less administrative effort than using bcp to export the required columns from each table into a separate text file and then merging those text files into a single text file.
B: Because we would not need to re-create the data file again, it would be easier to use the SELECT statement to create a global temporary table as these tables are dropped automatically when nothing reference them.
C: The bcp utility cannot use local temporary tables.
Note: Temporary tables are not stored in the current database; they are stored in the tempdb system. There are two types of temporary tables: local temporary tables, which are visible only to the connection that created them, and global temporary tables, that are visible to all connections.
转载请注明原文地址:https://kaotiyun.com/show/QuhZ777K
本试题收录于:
微软70228题库微软认证分类
0
微软70228
微软认证
相关试题推荐
Inthe1930s,anAmericanmeatcompanycameoutwithaspicedhamproductsoldinacan.Beforelong,Spam,asitwascalled,be
In2009theEuropeanCommissioncarriedoutaninvestigationintoMicrosoft.TheAmericansoftwaregianttiedInternetExplorer,
[A]Marketforglasscraftsisgrowing[B]Dependenceofcomputerdevelopmentonglass[C]Behindtheadaptabilityofglass[D]
School-agechildrenshouldparticipatein60minutesormoreofmoderatetovigorousphysicalactivitydaily,accordingtoanex
Directions:Inthissection,youareaskedtowriteanessaybasedonthefollowinginformation.Makecommentsandexpressy
Supposeyouorderedahairdryeronlineatthecostof$22,butonlyreceivedanemptypackagebox.Somethingmustbewrong.Wri
Herearesomemanagementtoolsthatcanbeusedtohelpyouleadapurposefullife.1.UseYourResourcesWisely.Yourdecisi
Evenintraditionaloffices,"thelinguafrancaofcorporateAmericahasgottenmuchmoreemotionalandmuchmoreright-brained
Evenintraditionaloffices,"thelinguafrancaofcorporateAmericahasgottenmuchmoreemotionalandmuchmoreright-brained
程序文件执行过程中要使用调试窗口,应该选择()。A.program菜单中的“trace”选项B.database菜单中的“trace”选项C.windows菜单中的“trace”选项D.debug菜单中的“trace”选项
随机试题
欲提高降尘室的生产能力,主要的措施是()。
男,35岁,双下肢及眼睑水肿3天。查体:颜面及双眼睑浮肿,肝脾肋下未及,移动性浊音(+),双下肢凹陷性水肿。辅助检查:尿蛋白(++++),红细胞3~6个/HP;血清ALT、AST正常,总蛋白49g/L,球蛋白35g/L,胆固醇10mmol/L,BUN7mm
抑制性突触后电位
可导致小儿营养不良的原因不包括()
关于对求助者的尊重,错误的是()。
“张老师在期末阶段组织学生举办‘班级音乐会’,并要求学生写出对他人表演的观后感和建议。”这种评价方式是()。
在下列关系运算中不改变关系表中的属性个数但能减少元组个数的是()。
素数是指只含有两个因子的自然数(即只能被自身和1整除)。孪生素数,是指两个相差为2的素数。比如,3和5,17和19等。所谓的孪生素数猜想,是由希腊数学家欧几里得提出的,意思是存在着无穷对孪生素数。该论题一直末得到证明。近期,美国一位华人讲师的最新研究表明,
通常认为左撇子比右撇子更容易出事故。这是一种误解。事实上,大多数家务事故,大到火灾、烫伤,小到切破手指,都出自右撇子。以上哪项最为恰当地概括了上述论证中的漏洞?
网络营销是企业借助因特网进行_______的一种方式。
最新回复
(
0
)