Yo, cocinero
Un nuevo programa de recetas con la particular conducción de un cocinero adolescente. El venezolano Omar Pereney, desde su visión de un joven de quince años, presentará propuestas para el desayuno, el almuerzo, la cena familiar así como para recibir a sus amigos compartiendo una tarde de videos y futbol o una salida de día de campo.
Enviar mail al programa
SELECT
RecId,
Titulo,
youtubeID,
(select u.Nombre from URL_RECETAS u where u.RecId=ResultadoPaginado.recId) as Titulo_amigable,
(select c.CocineroNombre+' '+CocineroApellido from COCINEROS c where c.CocineroID=ResultadoPaginado.CocineroID) as chef,
(select cast(l.Programa as varchar(max)) as Programa from LSTPROG l where l.PID=ResultadoPaginado.ProgramaID) as programa,
(select (select u.Nombre from URL_COCINEROS u where u.CocineroID=ResultadoPaginado.CocineroID) as chef_amigable from RECETAS r where r.RecId=ResultadoPaginado.RecId) as chef_amigable,
(select (select u.Nombre from URL_PROGRAMAS u where u.PID=ResultadoPaginado.ProgramaID) from RECETAS r where r.RecId=ResultadoPaginado.RecId) as programa_amigable,
CASE
WHEN (select top 1 f.ruta from FOTOS_RECETAS f where f.RecId=ResultadoPaginado.RecId and f.ruta!='') IS NULL THEN 'elgourmet.jpg'
else (select top 1 f.ruta from FOTOS_RECETAS f where f.RecId=ResultadoPaginado.RecId)
END
as foto,
RowNum
FROM
(
SELECT ROW_NUMBER()Over(Order by (select distinct f.ruta from fotos_recetas f where f.RecId=r.RecId) desc) As RowNum,
r.RecId ,
r.Titulo,
r.youtubeID,
r.CocineroID,
r.ProgramaID
FROM RECETAS r
WHERE r.ProgramaID='NNMtNfqEGPROGUmASeXM' and ocultar=0
)
AS ResultadoPaginado
WHERE RowNum > 0 and RowNum <= 6
Recetas del programa
...