首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
22
问题
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]Butworkisunderwaytogetcomputerstocapturehumanlifeandrememberitaspeopledo—recallingbitsofexperiencethata
Inanyrealmoflife-whetheracademic,social,business,orpolitical-theonlywaytosucceedistotalkeapractical,rathe
[A]Enduringproblemssuchaswar,poverty,andviolenceultimatelyspringfromhumannature,whichnotechnologicalinnovation
Thenewaircraftrepresentsa$250mbetbyBombardierthatMexicocouldprovidenotjustroutinelabourbutmanufacturingthat
AlmosteveryyearsincetheendofthefinancialcrisishasstartedwithrosyexpectationsamongAmericanforecasters,andthis
WhentheresidentsofBuenosAireswanttochangethepesostheydonottrustintothedollarstheydo,theygotoacueva,or"
Twomonthsago,yougotajobasaconsultantforHumanResourceServiceCompany.Butnowyoufindthattheworkisnotwhatyou
Self-recommendationWriteane-mailofabout100wordsbasedonthefollowingsituation:Youwanttoapplyforapart-ti
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
随机试题
注册会计师检查有关成本的记账凭证是否附有生产通知单、领发料凭证、产量和工时记录、工薪费用分配表、材料费用分配表、制造费用分配表,针对的认定是()。
某药厂生产的牛黄解毒胶囊具有清热解毒的功效,其药物组成为人工牛黄、石膏、雄黄、黄芩、大黄、桔梗、甘草、冰片,辅料为山梨醇、柠檬黄、十二烷基磺酸钠、对羟基苯甲酸酯、香草醛等。方中雄黄的化学成分主要是()。
甲晚上潜入一古寺,将寺内古墓室中有珍贵文物编号的金佛的头用钢锯锯下,销赃后获赃款10万元。对甲应以什么罪追究刑事责任?
刚毕业的张某委托甲房地产经纪公司(以下简称甲公司)承租一套住房,希望找到一家离目前工作地方比较近的房源。甲公司委派房地产经纪人刘某为张某服务。刘某通过网络平台信息,很快找到了张某满意的房源,该房源的所有权人为王某。看房前甲公司与张某签订的委托协议约定:张某
_________是设计方进度控制的依据,也是业主方控制设计进度的依据。()
牵牛花是在黎明四点左右开放,野蔷薇是在黎明五点左右开放,龙葵花是在清晨六点左右开放,芍药花是在清晨七点左右开放,鹅掌花是在中午开放,万寿菊是在下午三点左右开放。由此可见( )
企业购买股票时,实际支付的价款中包含的已宣告但尚未领取的现金股利,应在()项目中反映。
甲是精神病患者,一日突然手持匕首追杀乙,甲将乙逼到一房屋的角落里,乙在无处可逃的情况下,顺手将桌上的花瓶拾起扔向甲,致使甲右眼失明,乙的行为是()。
推进强军事业,必须毫不动摇坚持党对军队的绝对领导。党对军队绝对领导的基本内容为
A—ChildrennotadmittedI—night-servicewindowB—handlewithcareJ—CamerasforbiddenC—parki
最新回复
(
0
)