sql - SQL 查找/连接值范围内的一个值
解决方案
尝试这个:
select
shipments.*,
(select floor from rates where shipments.weight between rates.floor and rates.ceiling) as floor,
(select ceiling from rates where shipments.weight between rates.floor and rates.ceiling) as ceiling,
(select rate from rates where shipments.weight between rates.floor and rates.ceiling) as rate
from shipments
我已经在 Access 2013 上对此进行了测试。
推荐阅读
- python - 在带参数的数据框中使用应用会返回错误
- javascript - 在 Django 中,如何在单击鼠标后从预览中显示更多数据?
- r - 如何在 checkboxGroupInput 中使用下载数据集中的变量
- android - 更改屏幕动画的开始
- arduino - 为什么我不能用 AT 命令降低 ESP8266 的波特率
- angular - 刷新令牌更改时,Angular 会重播 http 调用
- java - 当我按下在片段中激活异步任务的按钮时,应用程序停止工作
- c# - 当我的 tcpListener 解析响应时如何通知 UserControl?
- jquery - 如何使用 JQuery 将博主帖子 H3 移动到图像的前面?
- flutter - 如何显示从一个点到另一个点的线?