Hello,
I keep receiving this error:
Msg 207, Level 16, State 1, Line 7
Invalid column name 'acct_id'.
Msg 4104, Level 16, State 1, Line 7
The multi-part identifier "v_returned_inventory.repid" could not be bound.
Msg 4104, Level 16, State 1, Line 7
The multi-part identifier "v_returned_inventory.acct_rep_id" could not be bound.
Here is my SQL:
SELECT AT_trans_for_emailTrigger.email_addr,AT_trans_for_emailTrigger.inet_event_description,Convert(nvarchar(50), v_live_inventory.event_date,(101)) as event_date,right(CONVERT(varchar, v_live_inventory.event_time, 100),7) as event_time,AT_trans_for_emailTrigger.add_usr,
sum(v_live_inventory.num_seats) as num_seats, v_live_inventory.section_name, v_live_inventory.acct_id, premclub.name_first + ' ' + premclub.name_last AS name,v_returned_inventory.acct_rep_id
FROM AT_trans_for_emailTrigger INNER JOIN
v_live_inventory ON AT_trans_for_emailTrigger.orderNumber = v_live_inventory.other_info_1 INNER JOIN
OPENQUERY(PREMCLUB, 'select name_first, name_last, cust_name_id from dba.v_cust_name') AS premclub ON
AT_trans_for_emailTrigger.cust_name_id = premclub.cust_name_id LEFT OUTER JOIN OPENQUERY(PREMCLUB,'select email_addr from dba.v_cust_email')as repemail ON repemail.acct_id = v_returned_inventory.acct_rep_id LEFT OUTER JOIN
v_cust_phone ON AT_trans_for_emailTrigger.cust_name_id = v_cust_phone.cust_name_id
GROUP BY AT_trans_for_emailTrigger.email_addr, AT_trans_for_emailTrigger.inet_event_description, v_live_inventory.event_date,
v_live_inventory.event_time, v_live_inventory.section_name, v_live_inventory.acct_id,
premclub.name_first + ' ' + premclub.name_last,AT_trans_for_emailTrigger.add_usr
Usually when I receive this error this is some sort of typo, but I double checked and everything is spelled correctly. Any other ideas?
Thanks!
I keep receiving this error:
Msg 207, Level 16, State 1, Line 7
Invalid column name 'acct_id'.
Msg 4104, Level 16, State 1, Line 7
The multi-part identifier "v_returned_inventory.repid" could not be bound.
Msg 4104, Level 16, State 1, Line 7
The multi-part identifier "v_returned_inventory.acct_rep_id" could not be bound.
Here is my SQL:
SELECT AT_trans_for_emailTrigger.email_addr,AT_trans_for_emailTrigger.inet_event_description,Convert(nvarchar(50), v_live_inventory.event_date,(101)) as event_date,right(CONVERT(varchar, v_live_inventory.event_time, 100),7) as event_time,AT_trans_for_emailTrigger.add_usr,
sum(v_live_inventory.num_seats) as num_seats, v_live_inventory.section_name, v_live_inventory.acct_id, premclub.name_first + ' ' + premclub.name_last AS name,v_returned_inventory.acct_rep_id
FROM AT_trans_for_emailTrigger INNER JOIN
v_live_inventory ON AT_trans_for_emailTrigger.orderNumber = v_live_inventory.other_info_1 INNER JOIN
OPENQUERY(PREMCLUB, 'select name_first, name_last, cust_name_id from dba.v_cust_name') AS premclub ON
AT_trans_for_emailTrigger.cust_name_id = premclub.cust_name_id LEFT OUTER JOIN OPENQUERY(PREMCLUB,'select email_addr from dba.v_cust_email')as repemail ON repemail.acct_id = v_returned_inventory.acct_rep_id LEFT OUTER JOIN
v_cust_phone ON AT_trans_for_emailTrigger.cust_name_id = v_cust_phone.cust_name_id
GROUP BY AT_trans_for_emailTrigger.email_addr, AT_trans_for_emailTrigger.inet_event_description, v_live_inventory.event_date,
v_live_inventory.event_time, v_live_inventory.section_name, v_live_inventory.acct_id,
premclub.name_first + ' ' + premclub.name_last,AT_trans_for_emailTrigger.add_usr
Usually when I receive this error this is some sort of typo, but I double checked and everything is spelled correctly. Any other ideas?
Thanks!