字段Amout为Varchar类型的小数数值,查询语句怎么写才能直接where amount='7.9'
已知字段Amount为Varchar类型,amount的值为小数数值,现在想要查询所有满足amount='7.9'的记录。
小弟直接用
1. select *from sales_d where amount='7.9'会直接爆varchar冲突。
2. select *from sales_d where convert(int,amount)='7.9'还是爆varchar冲突
3. select *from sales_d where convert(int,convert(numeric(18,9),amount))='7.9'同样出错。
最后使用select *From sales_d where convert(int,cast(amount as float))>='7' and convert(int,cast(amount as float))<'7',这样语句没有爆错。。。
求大神,有没有办法可以直接找出amount转换为数值等于7.9的记录呢, 非常感谢!!!
相关推荐
ratecalculator:基于多个贷方的简单贷款计算器
费率计算器 基于多个贷方的简单贷款计算器 用法 java -jar [path-to-jar] [path-to-csv-data] [amount] where: [path-to-jar] is the path to the executable jar file produced by building this project [path-to-csv-data] is the path to the market data file [amount] is the loan request amout, which must be between 1000 and 15000 at 100 increments (as per the spec) 一步步 克隆回购 $ git clone https://github.com/ljd1987/ratecalculator.gi
企业仓库管理系统数据库设计PPT课件.pptx
企业仓库管理系统数据库设计PPT课件.pptx
企业仓库管理系统数据库设计(PPT36页).pptx
企业仓库管理系统数据库设计(PPT36页).pptx
2021企业仓库管理系统数据库设计推荐资料.ppt
2021企业仓库管理系统数据库设计推荐资料.ppt
schema-util-backup:更适合人工编写模式定义
模式工具 模式dsl解析 var schema = require ( 'schema-util' ) . schema ; var json = schema ( ` Array(foo) { href(href), title(title), img(image url): Image, amount(money amout) } ` ) ; // json should be so: /** { type: 'array', description: 'foo', properties: { href: { description: 'href', type: 'string' }, title: { description: 'title', type: 'string' },


