格式如:3444,56676
455
6,655,665

解决方案 »

  1.   

    declare @i as int
    set @i = 344456676
    print convert(varchar(20),cast(@i as money),1)
    /*
    344,456,676.00
    */
      

  2.   

    create table tb (col int)
    insert into tb values(344456676) 
    insert into tb values(455) 
    insert into tb values(6655665)
    goselect convert(varchar(20),cast(col as money),1) col from tbdrop table tb/*
    col                  
    -------------------- 
    344,456,676.00
    455.00
    6,655,665.00(所影响的行数为 3 行)
    */
      

  3.   

    是的用斗号格开
    convert(integer,col,1) 不行啊
      

  4.   

    如果是将一个数字转换成带有“千分号”的形式:
    declare @i as int 
    set @i = 345 
    select cast(cast(@i*1000 as numeric(8)) as varchar)+'‰'