Query using Firebird "SUBSTR" with Inline, QueryOver, Criteria

Asked

Viewed 154 times

1

Guys, I need to create a query using the "SUBSTR" function of Firebird with Line, queryOver or Criteria. I have option to create with HQL or SQL, but these would be my last options.

Anyone have an idea? Follow below example of the query.

SELECT *
 FROM LANCAMENTO
 WHERE SUBSTR(LAN_CD_CONTA, 1, 13) = :paramCd_Conta
  • What is that SUBSTR makes? Maybe if it is not possible have some alternative!

  • @Fernando, It is a function of Firebird, which is similar to substring, takes the value from one position (1) to another position (13).

  • If the query is something like this: SELECT * FROM LANCAMENTO WHERE substring(LAN_CD_CONTA from cast(@paramStart as INTEGER)+1 for cast(@paramEnd as INTEGER))=@paramCd_Conta; where @paramStart = 1 and @paramEnd = 13. There is something that will not suit the method substring firebird?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.