易截截图软件、单文件、免安装、纯绿色、仅160KB

SQL的截取 - MS-SQL Server / 基础类

数据库中price(列)是 :123600
现要弄成:12.40万 或者 12.30万
SQL code:
select ltrim(cast(price*10/10000/10.0 as dec(18,2)))+'万'
from tb


select 123600.0/10000

---------------------------------------
12.3600000

(1 行受影响)



SQL code:
select ltrim(cast(round(price/10000.0,1) as dec(18,2)))+'万' as price from [tb]


SQL code:
select ltrim(cast(round(price/10000.0,1) as dec(18,2)))+'万' as price from tb


SQL code:
ltrim(cast(round(price/10000.0,2) as dec(18,2))) as price



相关问答:

ASP链接SQL的简单登陆界面 - .NET技术 / ASP.NET

protected void btnLogin_Click(object sender, EventArgs e)
  {
  SqlConnection conn = new SqlConnection("Server = (local);user id = sa;pwd = 1;database = Login");
&nb ......

求一个SQL语句 - MS-SQL Server / 基础类

字段1,字段2.....字段N,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
想要的结果是:
1,Na ......

求一SQL写法 - MS-SQL Server / 基础类

id                           url                   rank     ......

请教SQL语句查询问题? - MS-SQL Server / 基础类

我想查询出每天数据的最大的一个值。表的格式如下
表名: hisdata
字段 编号 值 状态 时间  
  Id value state dattime  
  101 32.3 0 ......

关于Vb中sql语句的写法(100分) - Java / Web 开发

求个vb中的sql语句的写法,次sql语句的用法是分页程序
我写的如下:其中A是用来接收每页显示的记录的条数,B是用来接收显示的当前的页面.
sqltext="select top A * from log where id not in(select top ( ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号