你能保证长度么?你出错的情况如下declare @test table
(
col varchar(1)
)
insert into @test
select 'ab'

解决方案 »

  1.   

    不会的饿,字段长度绝对够了,int的,然后插入0,只不过要远程插3600条,只能插76条,77条就错
      

  2.   

    要语句
    我怀疑
    insert tablename 
    select ...
    union all
    select ...
    union all
    ...union all到第77个的时候,被前端数据库工具截断了,当然出错
      

  3.   

    insert into OPENDATASOURCE('SQLOLEDB','Data Source=IP;User ID=用户;Password=密码').dsfsj.dsfsj.SHhouse_1
    (InfoType,InfoSource,CityArea,HouseType,Address,ForUse,HouseModel,Floor,HouseArea,GarageArea,IsAllLetter,Price,Entironment,Facility,Re,AddTime,ClickNum,IsCustom,ConnectName,ConnectPhone,ConnectEmail,DeletePassword)
    select 'Sell',0,A.addr_catalog_name,H.house_admin_type_name,V.Addr,'普通住宅',
    rtrim(ltrim(V.room_num))+'室'+rtrim(ltrim(V.parlor_num))+'厅'+rtrim(ltrim(V.toilet_num))+'卫',V.Floor,V.Area,V.Shed,1,V.Price,V.public_memo,V.fit_up,'',V.update_date,0,1,V.Name,V.Phone,V.e_mail,'111111'
    from v_house_src_public as V,house_admin_type as H,addr_catalog as A
    where V.house_admin_type_cd=H.house_admin_type_cd 
    and V.addr_catalog_id=A.addr_catalog_id 
    and V.update_date > '2006-5-1' 
    order by V.update_date desc
    语句如上
      

  4.   

    看上去还是字段长度问题,你又不都是Int,显然有几个是字符型字段
      

  5.   

    不是,我的意思就是说,我测试的时候有把插入列只改为一列,int型的,我只插入数字0,也一样的问题,郁闷
      

  6.   

    要语句
    我怀疑
    insert tablename 
    select ...
    union all
    select ...
    union all
    ...union all
    这样写下去,3600条记录,语句长度是多少,是否超过系统的限制了
      

  7.   

    能不能到插入的数据库操作
    insert ...
    select ...
    from OPENDATASOURCE(...)..