Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Subselect in a query with like hint

$
0
0
Hi,
I´m a spanish oracle developer, my question is..
¿Is possible to use like hint with subselect? , i mean i want to find all rows in table A that contains a word in a field(CALLED CONTENT) in table B, concretely in a field called content too, i show you the idea although the syntax is incorrect.

select
' + char (39) + @country + char (39) + ' as PAIS,
A.ID,
A.IDUSUARIO MSISDN,
NULL AS MSISDN_COD,
convert(char(19),A.FECHA_ALVENTO, 121) AS FECHA_MO_LOCAL,
NULL AS FECHA_MO_LOCAL_D,
NULL AS FECHA_MO,
NULL AS FECHA_MO_D
from ' + @bdhist + '..ZED_MO_HIST as A
where (A.FECHA_ALVENTO >= '+ char(39) + @last_load_date + char(39) + ' and
A.FECHA_ALVENTO < dateadd(dd,+6,'+ char(39) + @last_load_date + char(39) + '))
and a.CODE=41
AND A.CONTENT LIKE (SELECT %CONTENT_FIELD_FROM_TABLE_B%)'

¿Could you please help me with that?
Regards.
Eloy.

Viewing all articles
Browse latest Browse all 13329

Trending Articles