Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Подсказка

Описаны наиболее востребованные блоки SQL-запросов, для получения данных объекта

Свойства страницы
Статус

Статус
colourGreyYellow
titleЧЕРНОВИКВ РАБОТЕ

Раздел


Данные кастомного атрибута объекта

ЗначенияSQL - запрос

Текст

Блок кода
languagesql
titletn_field_string
select tfs."value" as v
from tn_field_string tfs
join tn_field tf on tf.id = tfs.id
where tf."owner" = rkkbase.id and tf.cmjfield = 'stage'

Число

Блок кода
languagesql
titletn_field_decimal
select tfd."value" as v
from tn_field_decimal tfd
join tn_field tf on tf.id = tfd.id 
where tf."owner" = rkkbase.id and tf.cmjfield = 'index'

Дата

Блок кода
languagesql
titletn_field_dateonly
select tfs."value" as v
from tn_field_dateonly tfd
join tn_field tf on tf.id = tfd.id
where tf."owner" = rkkbase.id and tf.cmjfield = 'eventD'

Время

Блок кода
languagesql
titletn_field_timeonly
select tfs."value" as v
from tn_field_timeonly tft
join tn_field tf on tf.id = tft.id
where tf."owner" = rkkbase.id and tf.cmjfield = 'eventT'

Дата и время

Блок кода
languagesql
title tn_field_datetime
select tfs."value" as v
from tn_field_datetime tfdt
join tn_field tf on tf.id = tfdt.id
where tf."owner" = rkkbase.id and tf.cmjfield = 'eventDT'

Субъект СО

Блок кода
languagesql
titletn_field_string
coalesce(select string_agg(SPLIT_PART(tfs.value, '%', 1),',') as v
 			from tn_field_string tfs
 			join tn_field tf on tf.id = tfs.id
 			where tf."owner" = rkkbase.id and tf.cmjfield = 'Employee'),'Не указано')

Таблица

Блок кода
languagesql
titletn_field_string
coalesce((select tfs.value
       		from tn_field_string tfs
       		join tn_field tf on tf.id = tfs.id
       		where tf.owner = rkk.id and 
			tf.cmjfield ='receiptTables.type' and tf.idx = 0), '<Не указано>') as receiveWay
панель

Оглавление