title: is there any way to pivot rows to columns dynamically without a specific no of columns in firebird
body: <p>I need a way to display my data from rows to columns dynamically using sql. My row no. starts from 0 to N and I want to convert it to columns. I cannot use static column to match my requirement because the maximum no of rows changes every time depending on the policy required by the company. I have done researching but firebird has no pivot/transpose/cross-tab implementation (i might be wrong). Here are my tables</p>
  
  <p>here is my client tables</p>
  
  <p><a href="https://i.stack.imgur.com/zKJn7.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zKJn7.jpg" alt="enter image description here"></a></p>
  
  <p>here is my payable table</p>
  
  <p><a href="https://i.stack.imgur.com/2kqJB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2kqJB.jpg" alt="enter image description here"></a></p>
  
  <p>i need to display like this since there are many clients involve</p>
  
  <p><a href="https://i.stack.imgur.com/Lei5S.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lei5S.jpg" alt="enter image description here"></a></p>
  
  <p>as you can notice my client can have 0 to N payable. </p>
  
  <p>Is there a way to implement it using firebird sql?</p>