首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
36
问题
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
微软认证
相关试题推荐
[A]Thefirststepinpreparingamarketingplanisthatofproducingtheinformationnecessaryfordecision-making.Usually,a
Severaltypesoffinancialriskareencounteredininternationalmarketing;themajorproblemsincludecommercial,political,an
[A]Marketforglasscraftsisgrowing[B]Dependenceofcomputerdevelopmentonglass[C]Behindtheadaptabilityofglass[D]
[A]Butworkisunderwaytogetcomputerstocapturehumanlifeandrememberitaspeopledo—recallingbitsofexperiencethata
[A]"Ijustdon’tknowhowtomotivatethemtodoabetterjob.We’reinabudgetcrunchandIhaveabsolutelynofinancialrewa
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
MenorcaorMajorca?Itisthattimeoftheyearagain.Thebrochuresarepilingupintravelagentswhilenewspapersandmagazin
Itstartedsmall.Justapoliticalslogan,pastedontoaposterinabackofficesomewhere;NOEUROin1999.Germany’smainoppo
Evenintraditionaloffices,"thelinguafrancaofcorporateAmericahasgottenmuchmoreemotionalandmuchmoreright-brained
TheoutbreakofswinefluthatwasfirstdetectedinMexicowasdeclaredaglobalepidemiconJune11,2009.Itisthefirstwo
随机试题
根据我国仲裁法的规定,仲裁委员会自收到仲裁申请书之日起应当作出受理或不受理决定的期限是
根据各级各类学校任务确定的对所培养的人的特殊要求,我们习惯上称为()
避孕片1号每片含避孕针1号每支含
A.减少肠道内氨的形成和吸收B.纠正氨基酸不平衡C.降低门静脉压力D.纠正电解质紊乱E.纠正酸碱平衡紊乱肝性脑病注射支链氨基酸的主要作用是
下列属于药物对症治疗的是
商品经营者或者服务提供者承担费用,通过一定媒介和形式直接或者间接地介绍自己所推销的商品或者所提供的服务的是受委托提供广告设计、制作、代理服务的法人、其他经济组织或者个人是
某私营业主投资建设某工程,邀请同行业有类似工程业绩的A、B、C、D、E、F等六家单位进行机电安装工程总承包的投标,工程采用总价包干,变更在分部工程价±5%范围内不做调整。工期18个月。投标前一个小时,A公司突然提交总价降低10%的补充标书。开标后,B公
我国第一艘自主建造的极地科学考察破冰船2018年9月10日在上海下水,并正式命名为“雪龙2”号,标志着我国极地考察现场保障和支撑能力取得新的突破。()
protocol
微分方程xdy+2ydx=0满足初始条件y|x=2=1的特解为()
最新回复
(
0
)