194 | | }}} |
| 194 | -- Pobranie opisu z nadrzędnej komórki organizacyjnej |
| 195 | SELECT (SELECT regexp_replace(ndedsc, E'[\\n\\r]+', ' EDOK_LBR', 'g' ) FROM organization_units o WHERE orunid = get_ndedsc(8)::int) |
| 196 | FROM orgtree_view u |
| 197 | INNER JOIN documents d ON u.usr_id = d.adduid |
| 198 | WHERE d.doc_id = 250 |
| 199 | |
| 200 | -- Status dokumentu (z ogólnego słownika statusów |
| 201 | SELECT tops.dscrpt FROM types_of_processes_states tops |
| 202 | LEFT JOIN documents d ON tops.tpstid = d.tpstid AND tops.clsnam = 'DOCUMENT' |
| 203 | AND d.doc_id = 1 |
| 204 | |
| 205 | }}} |