Home > database >  Like instances
Like instances

Time:09-27

SELECT the repair list. Rob maintenance, repair. The repair units
The FROM repair list
The WHERE (((repair list. Rob maintenance) Like "* *" tsai));

Could you tell me how to set the like conditions, as a variable?
Such as according to the open window: [Forms]! [print window]! [] rob maintenance people the value of the

CodePudding user response:

+ 'variable name' + '%'

CodePudding user response:

String ls_name

Ls_name="* *" tsai;

SELECT the repair list. Rob maintenance, repair. The repair units
The FROM repair list
WHERE the repair list. Rob maintenance people Like: ls_name;

CodePudding user response:

refer to the second floor newease response:
string ls_name

Ls_name="* *" tsai;

SELECT the repair list. Rob maintenance, repair. The repair units
The FROM repair list
WHERE the repair list. Rob maintenance people Like: ls_name;

The top!

CodePudding user response:

What database use * as a wildcard? Ha ha, never used, only seen % and _

CodePudding user response:

reference 4 floor thelittleprince response:
what database use * as a wildcard? Ha ha, never used, only seen % and _

Access seems to be

CodePudding user response:

S_WORD='%' + TRIM (SLE_1. TEXT) + '%'
SELECT the repair list. Rob maintenance, repair. The repair units
The FROM repair list
WHERE the repair list. Rob maintenance people Like: S_WORD;

CodePudding user response:

Positive solution!

CodePudding user response:

Thank you for your enthusiastic help,

My purpose is not to record query contains CAI word, but is similar to
SELECT the repair list. Rob maintenance, repair. The repair units
The FROM repair list
The WHERE (((repair list. Rob maintenance people) Like "* (Forms)! [print window]! [rob maintenance people] * "));
But it is wrong, what I mean is that the "* *" CAI according to the form of an open the combo box value: [Forms]! [print window]! [] rob maintenance people value, the combo box from the drop-down list, select one person at a time, after open the query will be according to the names, and the query table in the "rob maintenance people" in the field a cell has several names, such as

The repair unit to rob maintenance person
Changxing - village clinic ShiChao Newport, Qin Jun
New - spring breeze village clinic ShiChao, vertical Qin Jun, Cai Huihua
Fort township health centers branch five Xiao ShiChao, Qin Jun
Yingyue (institutes ShiChao, Qin Jun
Changxing - create village clinics ShiChao, Qin Jun
Changxing - feng village clinic ShiChao first, Qin Jun
Chen jia yu feng village clinic ShiChao, Qin Jun
New - vertical spring breeze village clinics ShiChao
Hong Kong along - along the village clinic ShiChao, Qin Jun
Fort township health centers ShiChao, Qin Jun


And
String ls_name

Ls_name="* *" tsai;

SELECT the repair list. Rob maintenance, repair. The repair units
The FROM repair list
WHERE the repair list. Rob maintenance people Like: ls_name;

The string also has a problem, prompt said invalid SPL statements, I access database,

CodePudding user response:


The repair unit to rob maintenance person
Changxing - village clinic ShiChao Newport, Qin Jun
New - spring breeze village clinic ShiChao, vertical Qin Jun, Cai Huihua
Fort township health centers branch five Xiao ShiChao, Qin Jun
Yingyue (institutes ShiChao, Qin Jun
Changxing - create village clinics ShiChao, Qin Jun
Changxing - feng village clinic ShiChao first, Qin Jun
Chen jia yu feng village clinic ShiChao, Qin Jun
New - vertical spring breeze village clinics ShiChao
Hong Kong along - along the village clinic ShiChao, Qin Jun
Fort township health centers ShiChao, Qin Jun
  • Related