Just yesterday as a client handed me stuff with spaces in the names, I was thinking how much I dislike spaces in names. Even when they are legal, they can cause all sorts of interesting occurrences when software tries to parse them.
According to your 1.jpg you really do have both a table called "ADQUICK_USER_AD_PREFERENCES" and another one called "ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID."
This is causing your code fits, and could inspire future maintenance programmers (possibly including yourself) to cuss you out. Some of the words you've chosen are even worse than spaces, as this name looks like an SQL fragment.
Your 3.jpg shows the fields in "ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID", but you don't provide the detail for "ADQUICK_USER_AD_PREFERENCES." Also, we don't know your actual goal.
ariodoni wrote:
[Select NO_OF_ADS_AT_A_TIME from ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID = '1002']
This is looking for all tuples in "ADQUICK_USER_AD_PREFERENCES" with a WEBSITE_ID of '1002' and returning NO_OF_ADS_AT_A_TIME from those tuples. It isn't doing anything with your table "ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID."
ariodoni wrote:
error
Could not execute query [Select NO_OF_ADS_AT_A_TIME from ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID = '1002'] - Unknown column 'NO_OF_ADS_AT_A_TIME' in 'field list't'
This is saying that their is no field called NO_OF_ADS_AT_A_TIME in the table "ADQUICK_USER_AD_PREFERENCES". I presume this is true.
Please change the name of your "ADQUICK_USER_AD_PREFERENCES WHERE WEBSITE_ID" table. Then run your query on it, or run a query on "ADQUICK_USER_AD_PREFERENCES" based on fields actually contained in the table. Which depends on your data and what you need to accomplish.