求教几个个SQL语句的含意
来源:百度知道 编辑:UC知道 时间:2024/06/17 04:32:54
1
SELECT 店铺编号 cust,cast(折扣 as char(4)) dis into temp1
FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source="d:\bk\客户.xls";
Extended Properties="Excel 5.0;HDR=Yes;";Persist Security Info=False')...sheet2$
2
select * into #temp1 from OPENROWSET('MICROSOFT.JET.OLEDB.4.0'
,'Excel 5.0;HDR=YES;DATABASE=d:\bk\花名册.xls',sheet1$)
3
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[checkgoodssp]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[checkgoodssp]
请详细说明
SELECT 店铺编号 cust,cast(折扣 as char(4)) dis into temp1
FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source="d:\bk\客户.xls";
Extended Properties="Excel 5.0;HDR=Yes;";Persist Security Info=False')...sheet2$
2
select * into #temp1 from OPENROWSET('MICROSOFT.JET.OLEDB.4.0'
,'Excel 5.0;HDR=YES;DATABASE=d:\bk\花名册.xls',sheet1$)
3
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[checkgoodssp]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[checkgoodssp]
请详细说明
1,查询 店铺编号 cust,cast 然后将查询结果插入到temp1 表,数据源:从Excel的 客户 表;
2,查询所有的资料然后将结果插入到 #temp1 表,数据源:从Excel的 花名册 表;
3,如果不存在存储过程IsProcedure(存在就删除)就建立一个,数据源:sysobjects ,
哪呢?
什么?!