Guest_imported
New member
- Jan 1, 1970
- 0
Hi,
I have a large string(a field with string length250), where we must "cut" the position. I think with the mid function but how??. I shall explain the situation. I have three fields. In the first field we can find the ID numbers of the tables, the second field is the name of the table, the third field is a large string with the numbers 0,1,2,3 and 4. In this string is the information about right(permissions) on tables the 0 = nothing, 1=create, 2=read, 3=update 4=delete. The position of this values are the table ID's. For example 43243332, the first 4 is table ID=1(Customer), the second 3 is table ID=2 (Supplier), the third 2 is table ID = 3(Articles). I must only extract(From this string) the 1,2,3 and 4. The result must customer = 4(delete), supplier = 3(update) and articles 2(read).
Example:
{Field1} {Field2} {Field3}
1 Customer 44444443323444444444433332222111
2 Supplier 43444444444444444444333333332222
3 Articles 41222222222222244444444221222334
... .... ...
... .... ...
must be
{Field1} {Field2} {Field3}
1 Customer Delete
2 Supplier Update
3 Articles Read
... .... ...
... .... ...
A short explain is that i must check to the field1(table ID) and then take the value of the string from the position of Table ID, Thus when field1 is 5 i must take the 5th position of the string (values 1,2,3 or 4).
How can i do this, could somebody help me plss, I hope someone could find an answer this problem.
Sincerely,
Thomas
I have a large string(a field with string length250), where we must "cut" the position. I think with the mid function but how??. I shall explain the situation. I have three fields. In the first field we can find the ID numbers of the tables, the second field is the name of the table, the third field is a large string with the numbers 0,1,2,3 and 4. In this string is the information about right(permissions) on tables the 0 = nothing, 1=create, 2=read, 3=update 4=delete. The position of this values are the table ID's. For example 43243332, the first 4 is table ID=1(Customer), the second 3 is table ID=2 (Supplier), the third 2 is table ID = 3(Articles). I must only extract(From this string) the 1,2,3 and 4. The result must customer = 4(delete), supplier = 3(update) and articles 2(read).
Example:
{Field1} {Field2} {Field3}
1 Customer 44444443323444444444433332222111
2 Supplier 43444444444444444444333333332222
3 Articles 41222222222222244444444221222334
... .... ...
... .... ...
must be
{Field1} {Field2} {Field3}
1 Customer Delete
2 Supplier Update
3 Articles Read
... .... ...
... .... ...
A short explain is that i must check to the field1(table ID) and then take the value of the string from the position of Table ID, Thus when field1 is 5 i must take the 5th position of the string (values 1,2,3 or 4).
How can i do this, could somebody help me plss, I hope someone could find an answer this problem.
Sincerely,
Thomas