0:00:45 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 0:00:45 9 มีนาคม 2561 :try to logon with: GS1WS 0:00:45 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 0:00:45 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 1:00:40 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 1:00:40 9 มีนาคม 2561 :try to logon with: GS1WS 1:00:40 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 1:00:40 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 2:00:46 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 2:00:46 9 มีนาคม 2561 :try to logon with: GS1WS 2:00:46 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 2:00:46 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 3:00:40 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 3:00:40 9 มีนาคม 2561 :try to logon with: GS1WS 3:00:40 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 3:00:40 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 4:00:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 4:00:36 9 มีนาคม 2561 :try to logon with: GS1WS 4:00:36 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 4:00:36 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 5:00:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 5:00:36 9 มีนาคม 2561 :try to logon with: GS1WS 5:00:36 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 5:00:36 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 6:00:37 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:00:37 9 มีนาคม 2561 :try to logon with: GS1WS 6:00:37 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 6:00:37 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 7:00:40 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 7:00:40 9 มีนาคม 2561 :try to logon with: GS1WS 7:00:40 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 7:00:40 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 8:00:43 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:00:43 9 มีนาคม 2561 :try to logon with: GS1WS 8:00:43 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 8:00:43 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 8:28:45 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:28:45 9 มีนาคม 2561 :try to logon with: GS1WS 8:30:11 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:30:11 9 มีนาคม 2561 :try to logon with: GS1WS 9:00:26 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:00:26 9 มีนาคม 2561 :try to logon with: GS1WS 9:00:40 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:00:40 9 มีนาคม 2561 :try to logon with: GS1WS 9:00:40 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 9:00:40 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 9:02:11 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:02:11 9 มีนาคม 2561 :try to logon with: GS1WS 9:39:59 9 มีนาคม 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 9:48:19 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:48:19 9 มีนาคม 2561 :try to logon with: GS1WS 9:49:16 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:49:16 9 มีนาคม 2561 :try to logon with: GS1WS 9:54:02 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:54:02 9 มีนาคม 2561 :try to logon with: GS1WS 9:54:43 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:54:43 9 มีนาคม 2561 :try to logon with: GS1WS 9:55:35 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:55:35 9 มีนาคม 2561 :try to logon with: GS1WS 10:00:40 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:00:40 9 มีนาคม 2561 :try to logon with: GS1WS 10:00:40 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 10:00:40 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 10:00:40 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:00:40 9 มีนาคม 2561 :try to logon with: GS1WS 10:00:40 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 10:00:40 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 10:03:27 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:03:27 9 มีนาคม 2561 :try to logon with: GS1WS 10:31:57 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:31:57 9 มีนาคม 2561 :try to logon with: GS1WS 10:37:25 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:37:25 9 มีนาคม 2561 :try to logon with: GS1WS 10:37:49 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:37:49 9 มีนาคม 2561 :try to logon with: GS1WS 10:39:41 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:39:41 9 มีนาคม 2561 :try to logon with: GS1WS 10:41:48 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:41:48 9 มีนาคม 2561 :try to logon with: GS1WS 10:43:49 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:43:49 9 มีนาคม 2561 :try to logon with: GS1WS 11:00:40 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:00:40 9 มีนาคม 2561 :try to logon with: GS1WS 11:00:40 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 11:00:40 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 11:00:40 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:00:40 9 มีนาคม 2561 :try to logon with: GS1WS 11:00:40 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 11:00:40 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 11:05:43 9 มีนาคม 2561 :There was no endpoint listening at https://rdws.rd.go.th/serviceRD3/vatserviceRD3.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. 11:11:23 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:11:23 9 มีนาคม 2561 :try to logon with: GS1WS 11:11:59 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:11:59 9 มีนาคม 2561 :try to logon with: GS1WS 11:13:02 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:13:02 9 มีนาคม 2561 :try to logon with: GS1WS 11:13:48 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:13:48 9 มีนาคม 2561 :try to logon with: GS1WS 11:16:11 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:16:11 9 มีนาคม 2561 :try to logon with: GS1WS 11:17:14 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:17:14 9 มีนาคม 2561 :try to logon with: GS1WS 11:20:06 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:20:06 9 มีนาคม 2561 :try to logon with: GS1WS 11:20:55 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:20:55 9 มีนาคม 2561 :try to logon with: GS1WS 11:23:01 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:23:01 9 มีนาคม 2561 :try to logon with: GS1WS 11:27:06 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:27:06 9 มีนาคม 2561 :try to logon with: GS1WS 11:28:37 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:28:37 9 มีนาคม 2561 :try to logon with: GS1WS 11:30:27 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:30:27 9 มีนาคม 2561 :try to logon with: GS1WS 11:30:32 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:30:32 9 มีนาคม 2561 :try to logon with: GS1WS 11:31:24 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:31:24 9 มีนาคม 2561 :try to logon with: GS1WS 11:31:38 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:31:38 9 มีนาคม 2561 :try to logon with: GS1WS 11:34:49 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:34:49 9 มีนาคม 2561 :try to logon with: GS1WS 11:48:02 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:48:02 9 มีนาคม 2561 :try to logon with: GS1WS 11:49:25 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:49:25 9 มีนาคม 2561 :try to logon with: GS1WS 11:50:30 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:50:30 9 มีนาคม 2561 :try to logon with: GS1WS 11:51:33 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:51:33 9 มีนาคม 2561 :try to logon with: GS1WS 11:54:40 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:54:40 9 มีนาคม 2561 :try to logon with: GS1WS 11:57:21 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:57:21 9 มีนาคม 2561 :try to logon with: GS1WS 11:57:45 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:57:45 9 มีนาคม 2561 :try to logon with: GS1WS 11:58:57 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:58:57 9 มีนาคม 2561 :try to logon with: GS1WS 12:00:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:00:36 9 มีนาคม 2561 :try to logon with: GS1WS 12:00:36 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 12:00:36 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 12:00:39 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:00:39 9 มีนาคม 2561 :try to logon with: GS1WS 12:00:39 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 12:00:39 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 12:02:02 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:02:02 9 มีนาคม 2561 :try to logon with: GS1WS 12:05:32 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:05:32 9 มีนาคม 2561 :try to logon with: GS1WS 12:10:21 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:10:21 9 มีนาคม 2561 :try to logon with: GS1WS 12:20:13 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:20:13 9 มีนาคม 2561 :try to logon with: GS1WS 12:21:14 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:21:14 9 มีนาคม 2561 :try to logon with: GS1WS 12:26:53 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:26:53 9 มีนาคม 2561 :try to logon with: GS1WS 12:31:08 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:31:08 9 มีนาคม 2561 :try to logon with: GS1WS 12:32:14 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:32:14 9 มีนาคม 2561 :try to logon with: GS1WS 12:45:20 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:45:20 9 มีนาคม 2561 :try to logon with: GS1WS 12:46:41 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:46:41 9 มีนาคม 2561 :try to logon with: GS1WS 12:48:10 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:48:10 9 มีนาคม 2561 :try to logon with: GS1WS 13:00:40 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:00:40 9 มีนาคม 2561 :try to logon with: GS1WS 13:00:40 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 13:00:40 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 13:00:41 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:00:41 9 มีนาคม 2561 :try to logon with: GS1WS 13:00:41 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 13:00:41 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 13:14:58 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:14:58 9 มีนาคม 2561 :try to logon with: GS1WS 13:18:14 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:18:14 9 มีนาคม 2561 :try to logon with: GS1WS 13:18:42 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:18:42 9 มีนาคม 2561 :try to logon with: GS1WS 13:19:47 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:19:47 9 มีนาคม 2561 :try to logon with: GS1WS 13:21:37 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:21:37 9 มีนาคม 2561 :try to logon with: GS1WS 13:23:38 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:23:38 9 มีนาคม 2561 :try to logon with: GS1WS 13:24:44 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:24:44 9 มีนาคม 2561 :try to logon with: GS1WS 13:25:28 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:25:28 9 มีนาคม 2561 :try to logon with: GS1WS 13:26:12 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:26:12 9 มีนาคม 2561 :try to logon with: GS1WS 13:26:47 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:26:47 9 มีนาคม 2561 :try to logon with: GS1WS 13:28:06 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:28:06 9 มีนาคม 2561 :try to logon with: GS1WS 13:29:20 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:29:20 9 มีนาคม 2561 :try to logon with: GS1WS 13:30:00 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:30:00 9 มีนาคม 2561 :try to logon with: GS1WS 13:30:42 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:30:42 9 มีนาคม 2561 :try to logon with: GS1WS 13:43:55 9 มีนาคม 2561 :There was no endpoint listening at https://rdws.rd.go.th/serviceRD3/vatserviceRD3.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. 14:00:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:00:36 9 มีนาคม 2561 :try to logon with: GS1WS 14:00:36 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 14:00:36 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 14:00:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:00:36 9 มีนาคม 2561 :try to logon with: GS1WS 14:00:36 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 14:00:36 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 14:03:08 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:03:08 9 มีนาคม 2561 :try to logon with: GS1WS 14:05:20 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:05:20 9 มีนาคม 2561 :try to logon with: GS1WS 14:07:22 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:07:22 9 มีนาคม 2561 :try to logon with: GS1WS 14:07:27 9 มีนาคม 2561 :There was no endpoint listening at https://rdws.rd.go.th/serviceRD3/vatserviceRD3.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. 14:08:55 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:08:55 9 มีนาคม 2561 :try to logon with: GS1WS 14:10:25 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:10:25 9 มีนาคม 2561 :try to logon with: GS1WS 14:11:06 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:11:06 9 มีนาคม 2561 :try to logon with: GS1WS 14:11:18 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:11:18 9 มีนาคม 2561 :try to logon with: GS1WS 14:15:13 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:15:13 9 มีนาคม 2561 :try to logon with: GS1WS 14:17:53 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:17:53 9 มีนาคม 2561 :try to logon with: GS1WS 14:20:08 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:20:08 9 มีนาคม 2561 :try to logon with: GS1WS 14:23:52 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:23:52 9 มีนาคม 2561 :try to logon with: GS1WS 14:27:32 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:27:32 9 มีนาคม 2561 :try to logon with: GS1WS 14:30:22 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:30:22 9 มีนาคม 2561 :try to logon with: GS1WS 14:33:04 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:33:04 9 มีนาคม 2561 :try to logon with: GS1WS 14:35:54 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:35:54 9 มีนาคม 2561 :try to logon with: GS1WS 14:38:56 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:38:56 9 มีนาคม 2561 :try to logon with: GS1WS 14:40:17 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:40:17 9 มีนาคม 2561 :try to logon with: GS1WS 14:41:29 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:41:29 9 มีนาคม 2561 :try to logon with: GS1WS 14:42:09 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:42:09 9 มีนาคม 2561 :try to logon with: GS1WS 14:43:44 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:43:44 9 มีนาคม 2561 :try to logon with: GS1WS 14:45:39 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:45:39 9 มีนาคม 2561 :try to logon with: GS1WS 14:46:28 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:46:28 9 มีนาคม 2561 :try to logon with: GS1WS 14:46:41 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:46:41 9 มีนาคม 2561 :try to logon with: GS1WS 14:46:52 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:46:52 9 มีนาคม 2561 :try to logon with: GS1WS 14:47:49 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:47:49 9 มีนาคม 2561 :try to logon with: GS1WS 14:48:53 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:48:53 9 มีนาคม 2561 :try to logon with: GS1WS 14:52:06 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:52:06 9 มีนาคม 2561 :try to logon with: GS1WS 14:52:24 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:52:24 9 มีนาคม 2561 :try to logon with: GS1WS 14:54:08 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:54:08 9 มีนาคม 2561 :try to logon with: GS1WS 14:54:18 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:54:18 9 มีนาคม 2561 :try to logon with: GS1WS 14:56:39 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:56:39 9 มีนาคม 2561 :try to logon with: GS1WS 14:57:13 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:57:13 9 มีนาคม 2561 :try to logon with: GS1WS 14:58:19 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:58:19 9 มีนาคม 2561 :try to logon with: GS1WS 14:59:41 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:59:41 9 มีนาคม 2561 :try to logon with: GS1WS 15:00:39 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:00:39 9 มีนาคม 2561 :try to logon with: GS1WS 15:00:39 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 15:00:39 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 15:00:39 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:00:39 9 มีนาคม 2561 :try to logon with: GS1WS 15:00:39 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 15:00:39 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 15:00:54 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:00:54 9 มีนาคม 2561 :try to logon with: GS1WS 15:03:53 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:03:53 9 มีนาคม 2561 :try to logon with: GS1WS 15:06:33 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:06:33 9 มีนาคม 2561 :try to logon with: GS1WS 15:07:14 9 มีนาคม 2561 :There was no endpoint listening at https://rdws.rd.go.th/serviceRD3/vatserviceRD3.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. 15:08:55 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:08:55 9 มีนาคม 2561 :try to logon with: GS1WS 15:13:20 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:13:20 9 มีนาคม 2561 :try to logon with: GS1WS 15:15:32 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:15:32 9 มีนาคม 2561 :try to logon with: GS1WS 15:18:57 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:18:57 9 มีนาคม 2561 :try to logon with: GS1WS 15:25:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:25:36 9 มีนาคม 2561 :try to logon with: GS1WS 15:27:27 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:27:27 9 มีนาคม 2561 :try to logon with: GS1WS 15:30:54 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:30:54 9 มีนาคม 2561 :try to logon with: GS1WS 15:33:33 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:33:33 9 มีนาคม 2561 :try to logon with: GS1WS 15:36:17 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:36:17 9 มีนาคม 2561 :try to logon with: GS1WS 15:36:26 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:36:26 9 มีนาคม 2561 :try to logon with: GS1WS 15:39:24 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:39:24 9 มีนาคม 2561 :try to logon with: GS1WS 15:42:11 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:42:11 9 มีนาคม 2561 :try to logon with: GS1WS 15:44:07 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:44:07 9 มีนาคม 2561 :try to logon with: GS1WS 15:46:12 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:46:12 9 มีนาคม 2561 :try to logon with: GS1WS 15:46:33 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:46:33 9 มีนาคม 2561 :try to logon with: GS1WS 15:49:09 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:49:09 9 มีนาคม 2561 :try to logon with: GS1WS 15:49:37 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:49:37 9 มีนาคม 2561 :try to logon with: GS1WS 15:49:52 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:49:52 9 มีนาคม 2561 :try to logon with: GS1WS 15:50:15 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:50:15 9 มีนาคม 2561 :try to logon with: GS1WS 15:50:41 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:50:41 9 มีนาคม 2561 :try to logon with: GS1WS 15:51:02 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:51:02 9 มีนาคม 2561 :try to logon with: GS1WS 15:51:22 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:51:22 9 มีนาคม 2561 :try to logon with: GS1WS 15:52:10 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:52:10 9 มีนาคม 2561 :try to logon with: GS1WS 15:54:17 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:54:17 9 มีนาคม 2561 :try to logon with: GS1WS 15:56:38 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:56:38 9 มีนาคม 2561 :try to logon with: GS1WS 15:58:39 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:58:39 9 มีนาคม 2561 :try to logon with: GS1WS 16:00:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:00:36 9 มีนาคม 2561 :try to logon with: GS1WS 16:00:36 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 16:00:36 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 16:00:39 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:00:39 9 มีนาคม 2561 :try to logon with: GS1WS 16:00:39 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 16:00:39 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 16:05:02 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:05:02 9 มีนาคม 2561 :try to logon with: GS1WS 16:07:35 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:07:35 9 มีนาคม 2561 :try to logon with: GS1WS 16:20:41 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:20:41 9 มีนาคม 2561 :try to logon with: GS1WS 16:22:37 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:22:37 9 มีนาคม 2561 :try to logon with: GS1WS 16:30:28 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:30:28 9 มีนาคม 2561 :try to logon with: GS1WS 16:32:45 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:32:45 9 มีนาคม 2561 :try to logon with: GS1WS 16:35:14 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:35:14 9 มีนาคม 2561 :try to logon with: GS1WS 16:37:17 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:37:17 9 มีนาคม 2561 :try to logon with: GS1WS 16:40:59 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:40:59 9 มีนาคม 2561 :try to logon with: GS1WS 16:43:03 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:43:03 9 มีนาคม 2561 :try to logon with: GS1WS 16:45:38 9 มีนาคม 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 16:57:15 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:57:15 9 มีนาคม 2561 :try to logon with: GS1WS 16:59:25 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:59:25 9 มีนาคม 2561 :try to logon with: GS1WS 17:00:35 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:00:35 9 มีนาคม 2561 :try to logon with: GS1WS 17:00:36 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 17:00:36 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 17:00:39 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:00:39 9 มีนาคม 2561 :try to logon with: GS1WS 17:00:39 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 17:00:39 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 17:02:15 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:02:15 9 มีนาคม 2561 :try to logon with: GS1WS 17:03:21 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:03:21 9 มีนาคม 2561 :try to logon with: GS1WS 17:05:14 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:05:14 9 มีนาคม 2561 :try to logon with: GS1WS 17:07:12 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:07:12 9 มีนาคม 2561 :try to logon with: GS1WS 17:09:29 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:09:29 9 มีนาคม 2561 :try to logon with: GS1WS 17:11:23 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:11:23 9 มีนาคม 2561 :try to logon with: GS1WS 17:13:26 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:13:26 9 มีนาคม 2561 :try to logon with: GS1WS 17:16:36 9 มีนาคม 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 17:19:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:19:36 9 มีนาคม 2561 :try to logon with: GS1WS 17:24:24 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:24:24 9 มีนาคม 2561 :try to logon with: GS1WS 17:25:16 9 มีนาคม 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 17:26:29 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:26:29 9 มีนาคม 2561 :try to logon with: GS1WS 17:28:43 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:28:43 9 มีนาคม 2561 :try to logon with: GS1WS 17:49:03 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:49:03 9 มีนาคม 2561 :try to logon with: GS1WS 17:53:55 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:53:55 9 มีนาคม 2561 :try to logon with: GS1WS 18:00:20 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:00:20 9 มีนาคม 2561 :try to logon with: GS1WS 18:00:35 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:00:35 9 มีนาคม 2561 :try to logon with: GS1WS 18:00:35 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 18:00:35 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 18:00:35 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:00:35 9 มีนาคม 2561 :try to logon with: GS1WS 18:00:35 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 18:00:35 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 18:02:38 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:02:38 9 มีนาคม 2561 :try to logon with: GS1WS 18:09:02 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:09:02 9 มีนาคม 2561 :try to logon with: GS1WS 18:11:47 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:11:47 9 มีนาคม 2561 :try to logon with: GS1WS 19:00:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:00:36 9 มีนาคม 2561 :try to logon with: GS1WS 19:00:36 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 19:00:36 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 19:16:52 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:16:52 9 มีนาคม 2561 :try to logon with: GS1WS 19:21:56 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:21:56 9 มีนาคม 2561 :try to logon with: GS1WS 19:37:42 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:37:42 9 มีนาคม 2561 :try to logon with: GS1WS 20:00:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 20:00:36 9 มีนาคม 2561 :try to logon with: GS1WS 20:00:36 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 20:00:36 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 20:07:50 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 20:07:50 9 มีนาคม 2561 :try to logon with: GS1WS 20:09:50 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 20:09:50 9 มีนาคม 2561 :try to logon with: GS1WS 21:00:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 21:00:36 9 มีนาคม 2561 :try to logon with: GS1WS 21:00:36 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 21:00:36 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 21:01:16 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 21:01:16 9 มีนาคม 2561 :try to logon with: GS1WS 21:07:46 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 21:07:46 9 มีนาคม 2561 :try to logon with: GS1WS 21:10:15 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 21:10:15 9 มีนาคม 2561 :try to logon with: GS1WS 21:51:42 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 21:51:42 9 มีนาคม 2561 :try to logon with: GS1WS 22:00:38 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:00:38 9 มีนาคม 2561 :try to logon with: GS1WS 22:00:38 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 22:00:38 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 22:23:17 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:23:17 9 มีนาคม 2561 :try to logon with: GS1WS 22:23:51 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:23:51 9 มีนาคม 2561 :try to logon with: GS1WS 22:36:36 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:36:36 9 มีนาคม 2561 :try to logon with: GS1WS 22:50:03 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:50:03 9 มีนาคม 2561 :try to logon with: GS1WS 22:51:45 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:51:45 9 มีนาคม 2561 :try to logon with: GS1WS 22:52:28 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:52:28 9 มีนาคม 2561 :try to logon with: GS1WS 22:53:02 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:53:02 9 มีนาคม 2561 :try to logon with: GS1WS 22:55:56 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:55:56 9 มีนาคม 2561 :try to logon with: GS1WS 22:57:45 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:57:45 9 มีนาคม 2561 :try to logon with: GS1WS 23:00:40 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:00:40 9 มีนาคม 2561 :try to logon with: GS1WS 23:00:40 9 มีนาคม 2561 :getGS1changed=/*SELECT MB_MEMBER.MEMBER_CODE, MB_PRENAME.PRENAME_TH, MB_COMP_PERSON.COMP_PERSON_NAME_TH, MB_PRENAME.PRENAME_EN, MB_COMP_PERSON.COMP_PERSON_NAME_EN, MB_COMP_PERSON.TAX_ID, MB_MEMBER.REGIST_DATE, MB_MEMBER.MEMBER_MAIN_TYPE_CODE, MB_MEMBER.MEMBER_TYPE_CODE, MB_MEMBER.MEMBER_STATUS_CODE, MB_MEMBER_RETIRE.APPROVE_DATE FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE INNER JOIN MB_MEMBER_RETIRE ON MB_MEMBER.REGIST_CODE = MB_MEMBER_RETIRE.REGIST_CODE LEFT OUTER JOIN MB_PRENAME ON MB_COMP_PERSON.PREN_CODE = MB_PRENAME.PRENAME_CODE WHERE (MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300') AND (MB_MEMBER_RETIRE.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) ORDER BY MB_MEMBER_RETIRE.APPROVE_DATE*/ --declare @YYYYMMDD_FROM varchar(max) = '20171101' --declare @YYYYMMDD_TO varchar(max) = '20171201' create table tempWsGs1_001 ( id int, tax_id varchar(max) ) create table tempWsGs1_002 ( MEMBER_CODE varchar(max) , TAX_ID varchar(max) , BDB_CODE varchar(max) , MEMBER_MAIN_TYPE_CODE varchar(max) , MEMBER_MAIN_TYPE_NAME varchar(max) , MEMBER_TYPE_CODE varchar(max) , MEMBER_TYPE_NAME varchar(max) , BUSSINESS_TYPE_TH varchar(max) , BUSSINESS_TYPE_EN varchar(max) , PRENAME_TH varchar(max) , COMP_PERSON_NAME_TH varchar(max) , PRENAME_EN varchar(max) , COMP_PERSON_NAME_EN varchar(max) , ADDR_TH varchar(max) , ADDR_EN varchar(max) , ZIP_CODE_TH varchar(max) , ZIP_CODE_EN varchar(max) , TELEPHONE_TH varchar(max) , TELEPHONE_EN varchar(max) , EMAIL_TH varchar(max) , EMAIL_EN varchar(max) , STATUS varchar(max) , REGIST_DATE varchar(max) , MEMBER_DATE varchar(max) , UPDATE_DATE varchar(max) , CompanyPrefix varchar(max) ) insert into tempWsGs1_001 select distinct ROW_NUMBER() over (order by r.approve_date) as id, c.TAX_ID as tax_id from MB_MEMBER m,MB_COMP_PERSON c,MB_MEMBER_RETIRE r where r.REGIST_CODE=m.REGIST_CODE and m.MEMBER_MAIN_GROUP_CODE='300' and m.COMP_PERSON_CODE=c.COMP_PERSON_CODE AND (r.APPROVE_DATE BETWEEN dbo.fnc_StrToDateTime(@YYYYMMDD_FROM + '000000') AND dbo.fnc_StrToDateTime(@YYYYMMDD_TO + '235959')) declare @id int declare @totalRows int = (select count(*) from tempWsGs1_001) declare @currentRow int = 0 declare @BussinessTypeTH VARCHAR(max) declare @BussinessTypeEN VARCHAR(max) while @currentRow < @totalRows begin set @id = @currentRow+1 declare @TAX_ID varchar(max) set @TAX_ID = (select top 1 tax_id from tempWsGs1_001 where id=@id) insert into tempWsGs1_002 select * from fnc_GetGS1MemberInfoForWebServiceByTaxID(@TAX_ID) set @currentRow = @currentRow +1 end drop table tempWsGs1_001 select * from tempWsGs1_002 drop table tempWsGs1_002 23:00:40 9 มีนาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 23:04:55 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:04:55 9 มีนาคม 2561 :try to logon with: GS1WS 23:06:09 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:06:09 9 มีนาคม 2561 :try to logon with: GS1WS 23:08:55 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:08:55 9 มีนาคม 2561 :try to logon with: GS1WS 23:09:55 9 มีนาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:09:55 9 มีนาคม 2561 :try to logon with: GS1WS