Hello everyone, I hope your help.
I need insert into _tbl_2 the values of _tbl_1 for Db MySql.
_tbl_1:
Code:CTS Events DDDS 12345 EEES 123456 FFFS 78901
I need this output in _tbl2:
I need compose this string for the field Events:Code:ID _CTS Events 1 DDDS DDD 012345 2 EEES EEE 123456 3 FFFS FFF 078901
If the events value is a five numbers I need insert 0 value first number:Code:DDD 012345 EEE 123456 FFF 078901
I try this query:Code:DDD 12345 ===> DDD 012345 EEE 123456 ===> EEE 123456 FFF 78901 ===> FFF 078901
Buit in the field `Events` is inserted only 0 value...Code:insert into _tbl_2 ( `ID`, `_CTS`, `Events` ) ( select 0, `CTS`, LEFT(CTS,3) & "0" from _tbl_1 )
Can someone help me?
Thanks in advance.
Chevy









Bookmarks