#!/bin/shcd 'home/usrname/'ls cd '/home/usrname/VOC2007/Annotations/' for file in `ls /home/usrname/VOC2007/Annotations/`do echo $file sed -i '/<?xml version="1.0" ?>/d' $filedone echo 'all is ok.'
在数据库时候我设计了学生的分数为nvarchar(50),是为了在从TXT文件中读取数据插入到数据库表时候方便,但是在后期由于涉及到统计问题,比如求平均值等,需要int类型才可以,方法是:Convert(int,字段名).例如:select avg(Convert(int,M_Score)) from temp 建立视图,将视图当表示用 CREATE VIEW temp AS select StudentId, MAX(StudentScore) as M_Score from T_Studen