| |

VerySource

 Forgot password?
 Register
Search
Author: 傲世火凤凰

How to achieve the conversion of a cross Excel table into DBF

[Copy link]

0

Threads

7

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-22 05:15:01
| Show all posts
1. Select time period,'a' content, a percentage from temp into table bak1
    Here "content" and "percentage" are called aliases,
    In other words, the select query result has three fields: time period, content, percentage
    Among them, the [content] field is replaced by the character'a'
        The [percentage] field comes from the a field of temp.
   
   The query result should be
   Time period content percentage
   10:00-12:00 a 10%
   12:00-13:00 a 25%
Reply

Use magic Report

0

Threads

7

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-22 07:45:01
| Show all posts
2. select&amyarray(ncount) from table to array arrssl
    Is this statement correct?
    This statement is correct and can be run. I tried it. Among them, amyarray and arrssl are arrays.
Reply

Use magic Report

0

Threads

7

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-22 09:45:01
| Show all posts
3. What if there are dozens or hundreds of content in more than just A, B, and C?
  To be honest, I haven't thought of how to do it. Let me think about it.If the source table format is not fixed, it will be a lot more complicated.Of course, you can solve it with an array as you said.
  But I suggest that if possible, the format of the source table should be designed to be fixed as much as possible, that is, the fields of the source table should remain unchanged. I personally think that the fields of a good system data table should be limited and knowable. Otherwise, in your field Unpredictable problems may occur in the system during unlimited expansion. Of course, if the format of the source table is not in your control, there is no way.
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