mysql 查找pg_inquiry中字段estimate_no里含有'PGZZ2023041800131 '和‘PGZZ2023041900011 ’
时间: 2024-02-24 21:57:46 浏览: 96
可以使用以下 SQL 语句进行查询:
```
SELECT * FROM pg_inquiry
WHERE estimate_no IN ('PGZZ2023041800131', 'PGZZ2023041900011');
```
该语句使用了 `IN` 操作符,可以匹配包含多个指定字符串中的任意一个的字段。`estimate_no` 字段的值分别为 `'PGZZ2023041800131'` 和 `'PGZZ2023041900011'`,因此可以使用 `IN` 操作符将这两个值作为参数传入来进行查询。
相关问题
" SELECT `a`.`id`,`a`.`inquiry_no`,`a`.`type`,`a`.`is_multi`,`a`.`status`,`a`.`bank_name`,`a`.`sub_bank_name`,`a`.`branch_bank_name`,`a`.`customer_name`,`a`.`create_time`,`a`.`buss_username`,`a`.`estimate_no`,`a`.`evaluate_purpose`,`a`.`time_length`,a.business_no AS business_no,b.id as did,`b`.`inquiry_id`,`b`.`city`,`b`.`city_id`,`b`.`full_estate_name`,`b`.`size`,b.usage AS usage,`b`.`register_price`,`d`.`inquiry_detail`,d.appraiser_name AS response_username,`d`.`appraiser_id`,`d`.`appraise_level`,d.create_time AS response_time,`d`.`assessment_price`,`d`.`assessment_all_value`,`d`.`assessment_net_worth`,`d`.`assessment_net_worth_tow`,`d`.`total_tax1`,`d`.`total_tax2`,`d`.`internal_remarks`,d.id AS rid FROM `pg_inquiry` `a` LEFT JOIN `pg_inquiry_detail` `b` ON `b`.`inquiry_id`=`a`.`id` LEFT JOIN `pg_return_price` `d` ON `b`.`id`=`d`.`inquiry_detail` WHERE `a`.`status` > 0 AND `a`.`create_time` BETWEEN '2023-03-02 00:00:00' AND '2023-05-31 23:59:59' AND `is_simple` = 0 AND `is_automatic` = 0 ORDER BY `a`.`create_time` DESC,`d`.`create_time` DESC "报错:SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'usage, business_no, buss_username, ' at line 13,解决方法是什么
看起来 SQL 查询语句中有一个问题,'usage' 是 MySQL 中的保留关键字,不能用作列名。为了解决这个问题,可以将 'usage' 重命名为其他名称,例如 'property_usage'。修改后的 SQL 查询语句如下:
SELECT `a`.`id`,`a`.`inquiry_no`,`a`.`type`,`a`.`is_multi`,`a`.`status`,`a`.`bank_name`,`a`.`sub_bank_name`,`a`.`branch_bank_name`,`a`.`customer_name`,`a`.`create_time`,`a`.`buss_username`,`a`.`estimate_no`,`a`.`evaluate_purpose`,`a`.`time_length`,a.business_no AS business_no,b.id as did,`b`.`inquiry_id`,`b`.`city`,`b`.`city_id`,`b`.`full_estate_name`,`b`.`size`,`b`.`property_usage`,`b`.`register_price`,`d`.`inquiry_detail`,d.appraiser_name AS response_username,`d`.`appraiser_id`,`d`.`appraise_level`,d.create_time AS response_time,`d`.`assessment_price`,`d`.`assessment_all_value`,`d`.`assessment_net_worth`,`d`.`assessment_net_worth_tow`,`d`.`total_tax1`,`d`.`total_tax2`,`d`.`internal_remarks`,d.id AS rid FROM `pg_inquiry` `a` LEFT JOIN `pg_inquiry_detail` `b` ON `b`.`inquiry_id`=`a`.`id` LEFT JOIN `pg_return_price` `d` ON `b`.`id`=`d`.`inquiry_detail` WHERE `a`.`status` > 0 AND `a`.`create_time` BETWEEN '2023-03-02 00:00:00' AND '2023-05-31 23:59:59' AND `is_simple` = 0 AND `is_automatic` = 0 ORDER BY `a`.`create_time` DESC,`d`.`create_time` DESC
解释estimate_parameters = numopt(self.fun, self.grad, self.jacobian, self.x0, self.iterations, self.method, self.tol) estimate_properties = estimate_parameters[:3] est_ploar_and_orientation = self.polar_tensor_to_properties(estimate_parameters[3:]) estimate_properties = np.append(estimate_properties, est_ploar_and_orientation) self.estimate_properties = estimate_properties return estimate_properties
这段代码的作用是估计输入函数的参数。首先,使用numopt函数基于给定的函数、梯度、雅可比矩阵、初始值、迭代次数、优化方法和停止容差来计算参数的估计值。然后,将前三个估计参数存储在estimate_properties中。接下来,通过调用polar_tensor_to_properties函数将剩余的极坐标和方向参数转换为相应的物理属性(如弹性模量、泊松比、强度等),并将它们附加到estimate_properties数组中。最后,将estimate_properties返回并存储在对象的estimate_properties变量中。
阅读全文
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)