Re: [firebird-support] order by 1, 2 - fb 32990
hi helen... the comma is the less problem... A correct sql: select N.DTEMISSAONOTA as DATA, 'DINHEIRO' as MEIO_PAGAMENTO1, cast('DINHEIRO' as char(10)) as MEIO_PAGAMENTO2, '00' as MEIO_PAGAMENTO, N.VLRTOTALNOTA as VALOR, 0 as AUTENT_01, 0 as AUTENT_01_CALC, N.AUTENTICACAO_NOTA as AUTENT_02, 3 as TIPO from NOTA N where (N.EMPRESANOTA = 1) and (N.DTEMISSAONOTA between '05/11/2018' and '04/11/2018') and (N.MODELONOTA = '55') order by 1, 2 Error: can't format message 13:587 -- message file D:\GDS_FBCLIENT\FB3\firebird.msg not found. conversion error from string "DINHEIRO". Of course, the index for the field "const" does not make much sense, the strange is the error. because the constant field will be the same value in all registers. Firebird: Server version: WI-V6.3.3.32900 Firebird 3.0
Re: [firebird-support] order by 1, 2 - fb 32990
acgomes2...@yahoo.com.br wrote: > select > A.Codigo > 'DINHEIRO' FORMA_PAGTO > FROM NF A > where A.dataEmissao between '01.01.2018' and '31.01.2018' > and A.Modelo = '55' This should work fine if you place a comma after A.Codigo. It does not make any sense to ORDER BY 2 (nor ORDER BY 1,2) as your literal field FORMA_PAGTO has the same value in every row. So: select A.Codigo, /* << */ 'DINHEIRO' FORMA_PAGTO FROM NF A where A.dataEmissao between '01.01.2018' and '31.01.2018' and A.Modelo = '55' order by 1 HB
[firebird-support] order by 1, 2 - fb 32990
hi: select A.Codigo 'DINHEIRO' FORMA_PAGTO FROM NF A where A.dataEmissao between '01.01.2018' and '31.01.2018' and A.Modelo = '55' order by 1, 2 using, "order by 2", return a error but, if i use: cast('DINHEIRO' as varchar(10)) FORMA_PAGTO does not ocorrur.