| |

VerySource

 Forgot password?
 Register
Search
View: 2595|Reply: 11

About between and ~~~~~~~~ `

[Copy link]

1

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-15 23:20:01
| Show all posts |Read mode
first sentence
adoquery1.sql.add ('update daa074 set skqk = `` kasjhd' 'where daa074.elsyds between daa091.jdds2 and daa091.jdds2');
Second sentence
adoquery1.sql.add ('update daa074 set skqk = `` kasjhd' 'where daa074.elsyds between 1 and 1000');

If I write like the first sentence, I make a mistake
If you write like the second sentence, you can update successfully. Why? What should I write? ? ? ? ? ?

daa074, daa091 are dbf tables
Reply

Use magic Report

0

Threads

17

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

Post time: 2020-1-19 22:27:01
| Show all posts
adoquery1.sql.add ('update daa074 set skqk = `` kasjhd' 'where daa074.elsyds between daa091.jdds2 and daa091.jdds2');

and not both before and after daa091.jdds2
Reply

Use magic Report

1

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-1-20 11:54:02
| Show all posts
Front is jdds1
Reply

Use magic Report

1

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-1-20 12:18:01
| Show all posts
No mistakes in the program
Reply

Use magic Report

3

Threads

10

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-20 19:09:01
| Show all posts
BETWEEN begin_expression AND end_expression

The value in between must be a value, not a field or anything, and the types of begin_expression and end_expression must be the same
Reply

Use magic Report

0

Threads

17

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 United States

Post time: 2020-1-20 19:36:01
| Show all posts
What is the error message?
What is daa091.jdds1, daa091.jdds2
Reply

Use magic Report

1

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-1-23 18:00:02
| Show all posts
Error message:
[Microsoft] [ODBC Visual FoxPro Driver] Command contains unrecognized phrase / keyword '

They are the same type
Are all numerical in the vf table
Reply

Use magic Report

1

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-1-23 19:27:01
| Show all posts
adoquery1.sql.add ('update daa074 set skqk = (SELECT `` kasjhd' 'from daa074 a, daa091 b where a.elsyds between b.jdds1 and b.jdds2)');
If you update like this, you will get this error
'[Microsoft] [ODBC Visual FoxPro Driver] Function name is missing)'
Reply

Use magic Report

3

Threads

10

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-23 22:36:01
| Show all posts
BETWEEN begin_expression AND end_expression

It's not a BETWEEN AND error. It's your SQL statement that is wrong. You can replace it with where a> 1 and a <100. VF has never been used.


daa091.jdds1, daa091.jdds2 should be fields, not fields, but should be an explicit value
Reply

Use magic Report

1

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-1-24 07:00:02
| Show all posts
daa091.jdds1, daa091.jdds2
Is the field

 where a> 1 and a <100

What I want to accomplish is this
I add a field skqk in daa074

Then update the value
In daa074, there is a field elsyds. If the value of skqk is between I and daa091.jdds1, daa091.jdds2, I will be empty.
Because I want to compare records one by one, I ca n’t fix the range, so I need to take those two fields.

There is a better way without this
Help me
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list