FinanceFerret/2.0/sql/qryCbx Accts

From Woozle Writes Code
< FinanceFerret‎ | 2.0‎ | sql
Revision as of 18:02, 30 August 2009 by htyp>Woozle (Created page with '==About== * '''Purpose''': dataset for drop-down boxes * '''History''': ** '''2009-08-30''' Created for web interface version ==SQL== <section begin=sql /><mysql>CREATE OR REPLAC…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Purpose: dataset for drop-down boxes
  • History:
    • 2009-08-30 Created for web interface version

SQL

<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryCbx_Accts AS SELECT

 IFNULL(a.ID_Alias,a.ID) AS ID,
 CONCAT_WS(' < ',a.Name,ap.Name) AS Name

FROM Accounts AS a

 LEFT JOIN Accounts AS ap
 ON a.ID_Parent=ap.ID

ORDER BY Name;</mysql> <section end=sql />