D
doristsr
HI;
I m writing excel vba, i would like to execute a SQL query :
select * from receiver_line
where purc_order_id+'/'+cast(purc_order_line_no as varchar(3))
+'/'+receiver_id+'/'+cast(line_no as varchar(3))
not in( select purc_order_id+'/'+cast(purc_order_line_no as
varchar(3))
+'/'+receiver_id+'/'+cast(receiver_line_no as varchar(3))
from payable_line where receiver_id is not null )
may i know how do i write it in vba?
can it be like the following?
strSql = "select * from receiver_line" & _
"where purc_order_id+'/'+convert(char(3),
purc_order_line_no)+'/'+receiver_id+'/'+convert(char(3),line_no)" & _
"not in( select
purc_order_id+'/'+convert(char(3),purc_order_line_no)+'/'+receiver_id+'/'+convert(char(3),receiver_line_no)"
& _
"from payable_line where receiver_id is not null )"
i keep on getting error, can anyone correct me? thanks for your great
help
Doris
I m writing excel vba, i would like to execute a SQL query :
select * from receiver_line
where purc_order_id+'/'+cast(purc_order_line_no as varchar(3))
+'/'+receiver_id+'/'+cast(line_no as varchar(3))
not in( select purc_order_id+'/'+cast(purc_order_line_no as
varchar(3))
+'/'+receiver_id+'/'+cast(receiver_line_no as varchar(3))
from payable_line where receiver_id is not null )
may i know how do i write it in vba?
can it be like the following?
strSql = "select * from receiver_line" & _
"where purc_order_id+'/'+convert(char(3),
purc_order_line_no)+'/'+receiver_id+'/'+convert(char(3),line_no)" & _
"not in( select
purc_order_id+'/'+convert(char(3),purc_order_line_no)+'/'+receiver_id+'/'+convert(char(3),receiver_line_no)"
& _
"from payable_line where receiver_id is not null )"
i keep on getting error, can anyone correct me? thanks for your great
help
Doris