Postman collection
Payments Read

pixiBanklineExists

Returns the number of bank lines that match the given bank texts and, optionally, the amount.

Checks whether bank lines (BankLines) with the given values already exist, for example before importing a bank statement.

  • Empty strings in BankText01, BankText02 and BankText03 are treated as NULL.
  • At least one of the three text parameters must be filled. If all three are empty or missing, no search is done; the result row has count = 0 and the column error contains a message.
  • Otherwise all bank lines are counted where each given parameter matches the column of the same name exactly (= comparison, no LIKE). Parameters that are not given do not restrict the search.
  • BankAmount is optional and is compared exactly with BankAmount.

The call always returns exactly one row with the count, a text message and an error text (or NULL).

Notes

  • Errors are not raised as SQL errors. Check the column error: if it is not NULL, the parameters were invalid. In that case message still says No bankline was found..
  • Pitfall: a parameter that is not given is replaced by the column itself (ISNULL(@Param, Column)). Bank lines where one of the columns BankText01, BankText02, BankText03 or BankAmount is NULL are therefore never counted, even if that parameter was not passed.
  • Text comparison uses the collation of the database (usually case-insensitive). Trailing spaces are ignored in the comparison, leading spaces are not.
  • The query reads without NOLOCK. There are no side effects.

Tables used

BankLines · Read
SQL object:
dbo.pipiBanklineExists
Updated at 2026-10-30