当前位置:网站首页>SQL query, if value is null then return 1 - SQL query, if value is null then return 1
SQL query, if value is null then return 1 - SQL query, if value is null then return 1
2022-06-25 07:10:00 【French red wine sweet】
problem :
I have a query that is returning the exchange rate value set up in our system. I have a query to return the exchange rate value set in our system .Not every order will have an exchange rate (currate.currentrate) so it is returning null values. Not every order has an exchange rate (currate.currentrate), So it returns a null value .
Can I get it to return 1 instead of null? I can get it back 1 instead of null Do you ?
Something like an if statement maybe: similar if The thing of a statement may be :
if isnull(currate.currentrate) then 1 else currate.currentrate Here is my query below. This is my query below .I greatly appreciate all your help! I really appreciate your help !
SELECT orderhed.ordernum, orderhed.orderdate, currrate.currencycode, currrate.currentrate FROM orderhed LEFT OUTER JOIN currrate ON orderhed.company = currrate.company AND orderhed.orderdate = currrate.effectivedateSolution :
Reference resources : https://stackoom.com/en/question/10mYE边栏推荐
- Non-contact infrared temperature measurement system for human body based on single chip microcomputer
- Cloning and importing DOM nodes
- Flask 的入门级使用
- shell 上下两行合并成一行
- Power representation in go language
- [he doesn't mention love, but every word is love]
- The upper and lower lines of the shell are merged into one line
- [learn FPGA programming from scratch -43]: vision chapter - technology evolution of chip design in the post Moore era -2- evolution direction
- Why use NoSQL with MySQL?
- [learn shell programming easily]-5. Plan tasks
猜你喜欢

Navicat prevent new query from being deleted by mistake

Several schemes of traffic exposure in kubernetes cluster

Atomic alpha development board -- SD card and EMMC burning tool

【工具分享】一款颜值与技能并重的软件

【一起上水硕系列】Day 4

How to find happiness in programming and get lasting motivation?

Drawing shp files using OpenGL

Why use NoSQL with MySQL?

有了 MySQL 为什么要用 NoSQL?
![[tool sharing] a software that pays equal attention to appearance and skills](/img/c0/2c648752163d88e16e357e8a096354.png)
[tool sharing] a software that pays equal attention to appearance and skills
随机推荐
Bcrypt password encryption kalrry
In a single-page app, what is the right way to deal with wrong URLs (404 errors)?
Acwing2013. three lines
Streamnational platform version 1.5 is released, integrating istio and supporting openshift deployment
Streaming a large file using PHP
lotus v1.16.0-rc2 Calibration-net
Why use NoSQL with MySQL?
[ros2] Why use ros2? Introduction to ros2 system characteristics
Coffee script unmatched outent error
lotus v1.16.0-rc2 Calibration-net
joda. Time get date summary
Kubernetes 集群中流量暴露的几种方案
[Shangshui Shuo series] day 5
Want to self-study SCM, do you have any books and boards worth recommending?
想买股票去哪个证券公司开户更快更安全
ES can finally find brother Wukong!
[ACNOI2022]王校长的构造
Blue Bridge Cup SCM module code (LED) (code + comments)
活动报名|Apache Pulsar x KubeSphere 在线 Meetup 火热来袭
Leetcode 2163. Minimum difference of sum after element deletion