0

I'm trying to get the total count from each table on one row but getting this error

"Old style JOIN (ANSI JOINs) syntax is not allowed. Please use standard syntax."

The SQL query I'm using is below. is there an easy way to achieve this

SELECT 
(SELECT Count(*) FROM IMPORT_STAGING_DAILYWELCOME_DE) as total_WEL_Stage,
(SELECT COUNT(*) FROM SENDABLE_DE)  AS TOTAL_Pre_Sent
  • What is the common column between IMPORT_STAGING_DAILYWELCOME_DE and SENDABLE_DE – Samuel Dare Aug 17 '17 at 16:39
3

You could do it with a CROSS JOIN:

select 
  t1.total_WEL_Stage
, t2.TOTAL_Pre_Sent
from (
    select count(*) as total_WEL_Stage
    from IMPORT_STAGING_DAILYWELCOME_DE
) as t1
cross join (
    select count(*) as TOTAL_Pre_Sent
    from SENDABLE_DE
) as t2 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.