[SalesForce] ExactTarget – SQL Query Basics (Select column?)

I'm new to ExactTarget and trying to write a query just to select columns from one table into another to ensure the syntax I'm using is correct and even this basic syntax is not working. Can you please help with how the query should be written?

I want to select the SubscriberKey and StoreName columns and update those columns in Table A which has the exact same columns. When I run the query below, no data is added:

select
s.subscriberkey,
s.storename
from salesorder s

Update

The Primary Key is "SubscriberKey".

SFMC Support noted that the error was because "StoreName" field was not set to Nullable. I've made the changes and the query now runs "without errors", however, only the SubscriberKey and ShopVisits columns are populated in the target Data Extension.

"Select storename" is included in the query but this column is not populated. Do you know what else is missing from the query?

Best Answer

This has been resolved with ET support:

  • storename field needed to be mark as nullable (this was causing the error)
  • syntax updated to include "where storename is not null"

Thanks!

Related Topic