Jump to content

Recommended Posts

SELECT
      SUM(IF(increment_day < '2010-06-01',SUM(vdat_2992.counts),SUM(vdat_2449.clicktositeindicator))) as CTS
FROM
      (
        SELECT * FROM vdat_2874 WHERE increment_day >= '2010-06-01'
        UNION
        SELECT * FROM vdat_2992 WHERE increment_day <= '2010-06-01'
      ) detail    
WHERE
      campaignid IN (1633605)

 

I keep getting error saying

Category Timestamp Duration Message Line Position

Error 7/14/2011 12:00:44 PM 0:00:11.875 <link> - MySQL Database Error: Unknown column 'vdat_2992.counts' in 'field list' 1 0

 

What am I doing wrong. I even gave the database table in front of the column. Please Help.

 

Thank You

 

Gary

Link to comment
https://forums.phpfreaks.com/topic/242013-table-missing/
Share on other sites

@OP

 

Perhaps,

SELECT
      SUM(IF(increment_day < '2010-06-01',SUM(detail.counts),SUM(detail.clicktositeindicator))) as CTS
FROM
      (
        SELECT * FROM vdat_2874 WHERE increment_day >= '2010-06-01'
        UNION
        SELECT * FROM vdat_2992 WHERE increment_day <= '2010-06-01'
      ) detail    
WHERE
      campaignid IN (1633605)

will do?

 

Hope it helps.

Link to comment
https://forums.phpfreaks.com/topic/242013-table-missing/#findComment-1243355
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.