Time
***error querying data:
select coalesce((select cur_nome from cur_curriculo where email=a.email),nome_atleta) nome_atleta
,replace(coalesce((select cur_nome from cur_curriculo where email=a.email),nome_atleta),'-','-') curnome
, coalesce((select min('show') from cur_curriculo where email=a.email and status=1),'hide') as cls_showcur
,a.*
,case when length(coalesce(a.faixa_atual,a.GRADUACAO))<3 then 'preta'||coalesce(a.faixa_atual,a.GRADUACAO)||'.jpg'
else lower(coalesce(a.faixa_atual,a.GRADUACAO))||'.jpg'
end faixa_img1
,coalesce( (select top 1 nome_url||'?vs='||cast(version as varchar)
from ga_midia where grupo_id in (7,12) and ativ_para = a.atleta_id
order by midia_id desc
),a.FOTO_MIDIA_ID,'foto-perfil_7.jpeg')
imgarv_url
,case when length(coalesce(a.faixa_atual,a.GRADUACAO))<3 then
--case when coalesce(a.faixa_atual,a.GRADUACAO) in ('9','10') then 'VERMELHA ' else 'PRETA ' end ||
coalesce(a.faixa_atual,a.GRADUACAO)||'º Dan'
else upper(coalesce(a.faixa_atual,a.GRADUACAO)) || CASE WHEN COALESCE(a.grau,0) > 0 then ' com ponta' else '' end
end fainome1
,case when coalesce(a.faixa_atual,a.GRADUACAO) in ('1','2','3','4') then 'Mestre'
when coalesce(a.faixa_atual,a.GRADUACAO) in ('5','6','7','8','9','10') then 'Grão Mestre'
else ''
end titulo1
,(select ordem from faixas where faixa=faixa_atual) ordem
from atleta a
where equipe_id=:EQUIPEID
and atua_como in ('1luta','2prof','4chefe','5diret')
order by atua_como desc, ordem desc, nome_atleta
error message:
select coalesce((select cur_nome from cur_curriculo where email=a.email),nome_atleta) nome_atleta
,replace(coalesce((select cur_nome from cur_curriculo where email=a.email),nome_atleta),'-','-') curnome
, coalesce((select min('show') from cur_curriculo where email=a.email and status=1),'hide') as cls_showcur
,a.*
,case when length(coalesce(a.faixa_atual,a.GRADUACAO))<3 then 'preta'||coalesce(a.faixa_atual,a.GRADUACAO)||'.jpg'
else lower(coalesce(a.faixa_atual,a.GRADUACAO))||'.jpg'
end faixa_img1
,coalesce( (select top 1 nome_url||'?vs='||cast(version as varchar)
from ga_midia where grupo_id in (7,12) and ativ_para = a.atleta_id
order by midia_id desc
),a.FOTO_MIDIA_ID,'foto-perfil_7.jpeg')
imgarv_url
,case when length(coalesce(a.faixa_atual,a.GRADUACAO))<3 then
--case when coalesce(a.faixa_atual,a.GRADUACAO) in ('9','10') then 'VERMELHA ' else 'PRETA ' end ||
coalesce(a.faixa_atual,a.GRADUACAO)||'º Dan'
else upper(coalesce(a.faixa_atual,a.GRADUACAO)) || CASE WHEN COALESCE(a.grau,0) > 0 then ' com ponta' else '' end
end fainome1
,case when coalesce(a.faixa_atual,a.GRADUACAO) in ('1','2','3','4') then 'Mestre'
when coalesce(a.faixa_atual,a.GRADUACAO) in ('5','6','7','8','9','10') then 'Grão Mestre'
else ''
end titulo1
,(select ordem from faixas where faixa=faixa_atual) ordem
from atleta a
where equipe_id=101
and atua_como in ('1luta','2prof','4chefe','5diret')
order by atua_como desc, ordem desc, nome_atleta - Wrong data type: type: TIMESTAMP (93) expected: CHAR value: 2023-03-03 08:03:42.0
select coalesce((select cur_nome from cur_curriculo where email=a.email),nome_atleta) nome_atleta
,replace(coalesce((select cur_nome from cur_curriculo where email=a.email),nome_atleta),'-','-') curnome
, coalesce((select min('show') from cur_curriculo where email=a.email and status=1),'hide') as cls_showcur
,a.*
,case when length(coalesce(a.faixa_atual,a.GRADUACAO))<3 then 'preta'||coalesce(a.faixa_atual,a.GRADUACAO)||'.jpg'
else lower(coalesce(a.faixa_atual,a.GRADUACAO))||'.jpg'
end faixa_img1
,coalesce( (select top 1 nome_url||'?vs='||cast(version as varchar)
from ga_midia where grupo_id in (7,12) and ativ_para = a.atleta_id
order by midia_id desc
),a.FOTO_MIDIA_ID,'foto-perfil_7.jpeg')
imgarv_url
,case when length(coalesce(a.faixa_atual,a.GRADUACAO))<3 then
--case when coalesce(a.faixa_atual,a.GRADUACAO) in ('9','10') then 'VERMELHA ' else 'PRETA ' end ||
coalesce(a.faixa_atual,a.GRADUACAO)||'º Dan'
else upper(coalesce(a.faixa_atual,a.GRADUACAO)) || CASE WHEN COALESCE(a.grau,0) > 0 then ' com ponta' else '' end
end fainome1
,case when coalesce(a.faixa_atual,a.GRADUACAO) in ('1','2','3','4') then 'Mestre'
when coalesce(a.faixa_atual,a.GRADUACAO) in ('5','6','7','8','9','10') then 'Grão Mestre'
else ''
end titulo1
,(select ordem from faixas where faixa=faixa_atual) ordem
from atleta a
where equipe_id=101
and atua_como in ('1luta','2prof','4chefe','5diret')
order by atua_como desc, ordem desc, nome_atleta
EQUIPEID=101