Ex.
When retrieving the "Size(z)" value greater than ID = 0001H and less than ID = 00003H using the DBSELECT(P) instruction
[Product information table (proInfo)]
ID
Product
0001H
"AAA1"
0002H
"BBB2"
0003H
"CCC3"
[Program]
DBSELECT
D0
The program searches and outputs the
Size(z) value of ID 0002H by using the
DBSELECT instruction.
(1) Second condition data sizeWORD type (1 word)
(2) Second condition data sizeWORD type (2 word)
(3) Maximum output size 20 words
(4) Maximum number of outputs Default (0)
(5) Field name of first search condition
(6) The condition number is ">". Set K4.
(7) The logical operator setting value is "AND". Set K1.
(8) Set K1 for the determination value.
(9) Field name of second search condition
(10)The condition number is "<". Set K3.
(11)No logical operator setting value is used. Set K0.
(12)Set K3 for the determination value.
(13)K40 is output in WORD type (1 word).
Size(x)
80
40
60
·
Database
D10
D100
D200
D300
[Table name]
D10 p
r
o
I
n
f
o
D17 0000H
·
D42 0000H
Size(y)
Size(z)
100
60
90
40
110
50
[Output result]
M0
D500
[Searched value]
[Number of fields]
[Conditions]
D100 0001H
[Field name]
D101 S
i
z
e
(
z
)
D108 0000H
·
D132 0000H
D300
0001H
1 record
D301
K40
→(13)
Set conditions to search the value of
ID 0002H.
D200 0001H
→(1)
D201 0001H
→(2)
D202 K20
→(3)
D203
K0
→(4)
D204
I
(5)
D
D206 0000H
·
D235 0000H
D236 K4
→(6)
D237 K1
→(7)
D238 K1
→(8)
D239 I
D240 D
(9)
D241 0000H
·
D270 0000H
D271 K3
→(10)
D272 K0
→(11)
D273 K3
→(12)
7 APPLICATION INSTRUCTIONS
7.21 Database Access Instructions
7
973