首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
46
问题
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
Ofallthegoodsandservicestradedinthemarketeconomy,pharmaceuticalsareperhapsthemostcontentious.Thoughproducedby
Ofallthegoodsandservicestradedinthemarketeconomy,pharmaceuticalsareperhapsthemostcontentious.Thoughproducedby
Itishardtomakemoneypeddlingsocialmediaanywhere.Duringtheirfirstfewyearsinbusiness,FacebookandTwitterlostpo
[A]Butworkisunderwaytogetcomputerstocapturehumanlifeandrememberitaspeopledo—recallingbitsofexperiencethata
[A]Butworkisunderwaytogetcomputerstocapturehumanlifeandrememberitaspeopledo—recallingbitsofexperiencethata
Youareanactivememberofthestudentnewspaper.Thenewspaperiscurrentlylookingforajournalistforthesummersemester.
DrRichardBergland,abrainresearcherattheHarvardMedicalSchool,haswrittenapapersuggestingthathumanbrainisbasica
Evenintraditionaloffices,"thelinguafrancaofcorporateAmericahasgottenmuchmoreemotionalandmuchmoreright-brained
Americanfarmershavebeencomplainingoflaborshortagesforseveralyearsnow.Givenamulti-yeardeclineinillegalimmigrati
随机试题
某甲于某日在衣服里揣把尖刀在街上游荡,碰到了与其有前嫌的某乙等四人,由于对方人多,某甲逃跑,但被某乙追上,两人发生斗殴,后某甲怕对方一起上来打死他,便拿出尖刀欲向某乙臀部猛刺后逃走,但不期某乙闪身躲避时刺中腰部,后某甲逃离。某乙被送至医院后因抢救无效而死亡
背景资料:沿海地区某住宅工程,由4栋地下1层、地上12层、结构形式完全相同的单体组成,其中地下室为整体连接地下室。该工程地下水系发达,地下水对钢筋混凝土结构有侵蚀作用。屋面设计为不上人屋面,炉渣保温后细石混凝土封面找坡,最上层敷设SBS卷材防水层一道。
计算,其中D是y=x,x=0,y=,y=π围成的区域
王某因犯数罪被人民法院依法判处有期徒刑20年,服刑13年后被假释。在假释考验期的第6年,王某盗窃一辆汽车而未被发现。假释考验期满后的第4年,王某因抢劫而被逮捕,交代了自己在假释考验期限内盗窃汽车的行为。问:对王某假释考验期满后的抢劫罪应如何处理?
砂土地层中,开挖深度为14m、地下水位经井点降低至基坑底面以下的基坑,宜采用的支护形式是()。
下列有关定金与违约金区别的表述不正确的是()。
【《神灭论》】
城市学校
下面的网络中不属于分组交换网的是__________。
Inthedesertedfactoryseveralhugemachineswerelefttorustanddecay.
最新回复
(
0
)