当前位置:网站首页>SQL multi condition query cannot be implemented
SQL multi condition query cannot be implemented
2022-07-24 12:02:00 【CSDN Q & A】
On Error Resume Next
Dim i As Integer, j As Integer
Dim sql1 As String
Dim sql2 As String
Dim sql3 As String
Dim sql4 As String
With conn
.ConnectionString = "Provider=microsoft.ace.oledb.12.0;data source=" & ThisWorkbook.Path & "\ Price evaluation management system .accdb"
.Open
End With
sql1 = "select * from Summary of appraisal information where ( Picture number like '%" & aa1.Value & "%') Or ( name like '%" & aa1.Value & "%') or ( roughcast X like '%" & aa1.Value & "%')"'sql2 = "select * from Summary of appraisal information where ( roughcast X like '%" & aa2.Value & "%')"'sql3 = "select * from Summary of appraisal information where ( roughcast Y like '%" & aa3.Value & "%')"'sql4 = "select * from Summary of appraisal information where ( roughcast Z/ The diameter of like '%" & aa4.Value & "%')"'sql = "select * from Summary of appraisal information where Picture number like '%" & aa1.Value & "%'"'or ( roughcast X like '%" & aa2.Value & "%') or ( roughcast Y like '%" & aa3.Value & "%')or( roughcast Z like '%" & aa4.Value & "%')rs.Open sql1, conn, adOpenKeyset, adLockOptimisticrs.Open sql2, conn, adOpenKeyset, adLockOptimisticrs.Open sql3, conn, adOpenKeyset, adLockOptimisticrs.Open sql4, conn, adOpenKeyset, adLockOptimistic As the picture shows , Yes 4 Condition input boxes , The first one is to input the drawing number and name to query , second 、 3、 ... and 、 Four input X,Y,Z Query data , What I want to achieve is that the four query conditions can filter queries from each other , The input “ Cover plate ” Input after filtering X,Y,Z Sequential filtering , You can also enter it first X,Y,Z Enter the value after filtering “ Cover plate ” It can also filter queries , Nested queries , Who can point out how to do ? At present, only sql1 The filtering effect of , The later implementation is not
Copyright notice : This paper is about CSDN Blogger 「weixin_44370039」 The original article of , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/weixin_44370039/article/details/125808305

边栏推荐
- MySQL creates partition tables and automatically partitions them by day
- Best practice | using Tencent cloud AI character recognition to realize enterprise qualification certificate recognition
- 第0章 前言和环境配置
- Hash - 1. Sum of two numbers - some people fall in love during the day, some people watch the sea at night, and some people can't do the first question
- L1-049 天梯赛座位分配
- Literature record (part109) -- self representation based unsupervised exemplar selection in a union of subspaces
- Svn server and client installation (Chinese package) and simple use
- [C and pointer Chapter 14] preprocessor
- 2 万字详解,吃透 ES!
- Use and expansion of fault tolerance and fusing
猜你喜欢

6k+ star,面向小白的深度学习代码库!一行代码实现所有Attention机制!

Install MariaDB columnstore (version 10.3)
![[mathematical basis of Cyberspace Security Chapter 9] finite field](/img/2b/27ba1f3c6ec2ecff4538f9a63a79e8.jpg)
[mathematical basis of Cyberspace Security Chapter 9] finite field

20000 words detailed explanation, thoroughly understand es!
![Operational amplifier - Notes on rapid recovery [II] (application)](/img/fd/e12f43e23e6ec76c2b44ce7813e204.png)
Operational amplifier - Notes on rapid recovery [II] (application)

JVM visualvm: multi hop fault handling tool

What is prescaler in STM32

Linked list - 142. Ring linked list II

生信周刊第37期

使用Prometheus+Grafana实时监控服务器性能
随机推荐
离散分布常用公式及应用场景
4*4图片权重的收敛规则
哈希——202. 快乐数
Experience of redis deepwater area -- Interview reference
Shell script
Hash - 18. Sum of four numbers
Why is the datetime type field 8 hours earlier when I use flinkcdc to read MySQL's binlog?
Browser logic vulnerability collection
CCF 201803_ 1 jump jump
在kuborad图形化界面中,操作Kubernetes 集群,实现mysql中的主从复制
[Commons beanautils topic] 004 beanautils topic
LogBack & MDC & a simple use
Judge whether a group of cards can become shunzi (the size of the king is 14,15)
Literature record (part109) -- self representation based unsupervised exemplar selection in a union of subspaces
Using huggingface model to translate English
Miss waiting for a year! Baidu super chain digital publishing service is limited to 50% discount
L2-011 play with binary tree
三、MFC消息映射机制实现原理
栈顶与栈底
Common formulas and application scenarios of discrete distribution