![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, due to compatibility with legacy database codes I need to catenate two numeric fields filling the gaps with zeros. For example take a table with two numeric(5,0) fields, I need to catenate it in this way: fld_a fld_b wanted_result 123 12345 0012312345 54 123 0005400123 5432 1234 0543201234 I am thinking about something like: |
#3
| |||
| |||
|
|
Hi, due to compatibility with legacy database codes I need to catenate two numeric fields filling the gaps with zeros. For example take a table with two numeric(5,0) fields, I need to catenate it in this way: fld_a fld_b wanted_result 123 12345 0012312345 54 123 0005400123 5432 1234 0543201234 I am thinking about something like: |
#4
| |||
| |||
|
|
Hi, due to compatibility with legacy database codes I need to catenate two numeric fields filling the gaps with zeros. For example take a table with two numeric(5,0) fields, I need to catenate it in this way: fld_a fld_b wanted_result 123 12345 0012312345 54 123 0005400123 5432 1234 0543201234 I am thinking about something like: |
#5
| |||
| |||
|
|
Hi, due to compatibility with legacy database codes I need to catenate two numeric fields filling the gaps with zeros. For example take a table with two numeric(5,0) fields, I need to catenate it in this way: fld_a fld_b wanted_result 123 12345 0012312345 54 123 0005400123 5432 1234 0543201234 I am thinking about something like: |
#6
| |||
| |||
|
|
Hi, due to compatibility with legacy database codes I need to catenate two numeric fields filling the gaps with zeros. For example take a table with two numeric(5,0) fields, I need to catenate it in this way: fld_a fld_b wanted_result 123 12345 0012312345 54 123 0005400123 5432 1234 0543201234 I am thinking about something like: |
#7
| |||
| |||
|
|
Hi, due to compatibility with legacy database codes I need to catenate two numeric fields filling the gaps with zeros. For example take a table with two numeric(5,0) fields, I need to catenate it in this way: fld_a fld_b wanted_result 123 12345 0012312345 54 123 0005400123 5432 1234 0543201234 I am thinking about something like: |
#8
| |||
| |||
|
|
Hi, due to compatibility with legacy database codes I need to catenate two numeric fields filling the gaps with zeros. For example take a table with two numeric(5,0) fields, I need to catenate it in this way: fld_a fld_b wanted_result 123 12345 0012312345 54 123 0005400123 5432 1234 0543201234 I am thinking about something like: |
#9
| |||
| |||
|
|
Hi, due to compatibility with legacy database codes I need to catenate two numeric fields filling the gaps with zeros. For example take a table with two numeric(5,0) fields, I need to catenate it in this way: fld_a fld_b wanted_result 123 12345 0012312345 54 123 0005400123 5432 1234 0543201234 I am thinking about something like: |
#10
| |||
| |||
|
|
begin Coniglio Sgabbiato schrieb: Hi, due to compatibility with legacy database codes I need to catenate two numeric fields filling the gaps with zeros. For example take a table with two numeric(5,0) fields, I need to catenate it in this way: fld_a fld_b wanted_result 123 12345 0012312345 54 123 0005400123 5432 1234 0543201234 I am thinking about something like: test=*# select * from n; a | b ------+------- 123 | 12345 54 | 123 5432 | 1234 (3 rows) test=*# select to_char(a,'FM09999')||to_char(b,'FM09999') as "wanted result" from n; wanted result --------------- 0012312345 0005400123 0543201234 (3 rows) end Andreas |

![]() |
| Thread Tools | |
| Display Modes | |
| |