insert into t_gene_sy_pres (pres_name,address,byrs,edus_id,gdrxnl,kinderclass_id,kindertype_id)
SELECT pres_name,address,cast(byrs as numeric),cast(edus_id as numeric),cast(gdrxnl as numeric),
cast(kinderclass_id as numeric),cast(kindertype_id as numeric) FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0',
'Data Source="F:/TEST/TEST.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...[T_GENE_SY_PRES]
update opendatasource('Microsoft.Jet.OLEDB.4.0','Data Source="F:/各幼儿园师生资料/已处理/zhiye.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...[Sheet1$] set 职位='其他' where 职位 not in ('园长','教师','保健员','保育员','营养员',保教主任','财务','报帐员','书记','园长助理')
insert into opendatasource('Microsoft.Jet.OLEDB.4.0','Data Source="F:/资源.xls";User ID=Admin;Password=;Extended Properties=Excel 5.0')...[Sheet1$]
select p.pres_name,c.cla_name,f.res_title,f.res_path,f.pub_time from opendatasource('SQLOLEDB','Data Source=;User ID=sa;Password=').[pd-baby].dbo.t_gene_re_file f
join opendatasource('SQLOLEDB','Data Source=;User ID=sa;Password=').[pd-baby].dbo.t_gene_re_class c on
f.cla_id = c.cla_id join opendata
select p.pres_name,c.cla_name,f.res_title,f.res_path,f.pub_time from opendatasource('SQLOLEDB','Data Source=;User ID=sa;Password=').[pd-baby].dbo.t_gene_re_file f
join opendatasource('SQLOLEDB','Data Source=;User ID=sa;Password=').[pd-baby].dbo.t_gene_re_class c on
f.cla_id = c.cla_id join opendata