0:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 0:00:17 10 เมษายน 2561 :try to logon with: GS1WS 0:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 1:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 1:00:17 10 เมษายน 2561 :try to logon with: GS1WS 1:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 2:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 2:00:17 10 เมษายน 2561 :try to logon with: GS1WS 2:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 3:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 3:00:17 10 เมษายน 2561 :try to logon with: GS1WS 3:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 4:00:18 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 4:00:18 10 เมษายน 2561 :try to logon with: GS1WS 4:00:18 10 เมษายน 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:18 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 5:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 5:00:17 10 เมษายน 2561 :try to logon with: GS1WS 5:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 6:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:00:17 10 เมษายน 2561 :try to logon with: GS1WS 6:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 7:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 7:00:17 10 เมษายน 2561 :try to logon with: GS1WS 7:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 8:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:00:17 10 เมษายน 2561 :try to logon with: GS1WS 8:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 9:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:00:17 10 เมษายน 2561 :try to logon with: GS1WS 9:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 9:30:51 10 เมษายน 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. 9:53:14 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:53:14 10 เมษายน 2561 :try to logon with: GS1WS 10:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:00:17 10 เมษายน 2561 :try to logon with: GS1WS 10:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 10:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:00:17 10 เมษายน 2561 :try to logon with: GS1WS 10:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 10:27:28 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:27:28 10 เมษายน 2561 :try to logon with: GS1WS 10:31:53 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:31:53 10 เมษายน 2561 :try to logon with: GS1WS 10:40:26 10 เมษายน 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 10:57:07 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:57:07 10 เมษายน 2561 :try to logon with: GS1WS 11:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:00:17 10 เมษายน 2561 :try to logon with: GS1WS 11:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:00:17 10 เมษายน 2561 :try to logon with: GS1WS 11:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 11:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 11:20:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:20:17 10 เมษายน 2561 :try to logon with: GS1WS 11:26:35 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:26:35 10 เมษายน 2561 :try to logon with: GS1WS 11:31:14 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:31:14 10 เมษายน 2561 :try to logon with: GS1WS 11:34:01 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:34:01 10 เมษายน 2561 :try to logon with: GS1WS 11:39:45 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:39:45 10 เมษายน 2561 :try to logon with: GS1WS 11:43:44 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:43:44 10 เมษายน 2561 :try to logon with: GS1WS 12:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:00:17 10 เมษายน 2561 :try to logon with: GS1WS 12:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 12:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:00:17 10 เมษายน 2561 :try to logon with: GS1WS 12:00:18 10 เมษายน 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:18 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 12:03:15 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:03:15 10 เมษายน 2561 :try to logon with: GS1WS 12:28:01 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:28:01 10 เมษายน 2561 :try to logon with: GS1WS 12:36:41 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:36:41 10 เมษายน 2561 :try to logon with: GS1WS 12:39:29 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:39:29 10 เมษายน 2561 :try to logon with: GS1WS 12:39:45 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:39:45 10 เมษายน 2561 :try to logon with: GS1WS 12:39:52 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:39:52 10 เมษายน 2561 :try to logon with: GS1WS 12:49:39 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:49:39 10 เมษายน 2561 :try to logon with: GS1WS 12:50:09 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:50:09 10 เมษายน 2561 :try to logon with: GS1WS 12:50:09 10 เมษายน 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:50:09 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 12:51:20 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:51:20 10 เมษายน 2561 :try to logon with: GS1WS 12:52:12 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:52:12 10 เมษายน 2561 :try to logon with: GS1WS 12:54:44 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:54:44 10 เมษายน 2561 :try to logon with: GS1WS 13:00:21 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:00:21 10 เมษายน 2561 :try to logon with: GS1WS 13:00:21 10 เมษายน 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:21 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 13:00:28 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:00:28 10 เมษายน 2561 :try to logon with: GS1WS 13:00:28 10 เมษายน 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:28 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 13:04:54 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:04:54 10 เมษายน 2561 :try to logon with: GS1WS 13:08:54 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:08:54 10 เมษายน 2561 :try to logon with: GS1WS 13:09:52 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:09:52 10 เมษายน 2561 :try to logon with: GS1WS 13:10:11 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:10:11 10 เมษายน 2561 :try to logon with: GS1WS 13:10:42 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:10:42 10 เมษายน 2561 :try to logon with: GS1WS 13:12:51 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:12:51 10 เมษายน 2561 :try to logon with: GS1WS 13:36:04 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:36:04 10 เมษายน 2561 :try to logon with: GS1WS 13:39:22 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:39:22 10 เมษายน 2561 :try to logon with: GS1WS 13:39:27 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:39:27 10 เมษายน 2561 :try to logon with: GS1WS 13:42:35 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:42:35 10 เมษายน 2561 :try to logon with: GS1WS 13:43:00 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:43:00 10 เมษายน 2561 :try to logon with: GS1WS 13:43:48 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:43:48 10 เมษายน 2561 :try to logon with: GS1WS 13:44:33 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:44:33 10 เมษายน 2561 :try to logon with: GS1WS 13:45:10 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:45:10 10 เมษายน 2561 :try to logon with: GS1WS 13:45:57 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:45:57 10 เมษายน 2561 :try to logon with: GS1WS 13:47:43 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:47:43 10 เมษายน 2561 :try to logon with: GS1WS 13:48:26 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:48:26 10 เมษายน 2561 :try to logon with: GS1WS 13:48:38 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:48:38 10 เมษายน 2561 :try to logon with: GS1WS 13:49:09 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:49:09 10 เมษายน 2561 :try to logon with: GS1WS 13:49:15 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:49:15 10 เมษายน 2561 :try to logon with: GS1WS 13:53:20 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:53:20 10 เมษายน 2561 :try to logon with: GS1WS 14:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:00:17 10 เมษายน 2561 :try to logon with: GS1WS 14:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 14:00:21 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:00:21 10 เมษายน 2561 :try to logon with: GS1WS 14:00:21 10 เมษายน 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:21 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 14:03:37 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:03:37 10 เมษายน 2561 :try to logon with: GS1WS 14:05:18 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:05:18 10 เมษายน 2561 :try to logon with: GS1WS 14:06:12 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:06:12 10 เมษายน 2561 :try to logon with: GS1WS 14:06:29 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:06:29 10 เมษายน 2561 :try to logon with: GS1WS 14:07:41 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:07:41 10 เมษายน 2561 :try to logon with: GS1WS 14:08:40 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:08:40 10 เมษายน 2561 :try to logon with: GS1WS 14:09:36 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:09:36 10 เมษายน 2561 :try to logon with: GS1WS 14:13:38 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:13:38 10 เมษายน 2561 :try to logon with: GS1WS 14:15:12 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:15:12 10 เมษายน 2561 :try to logon with: GS1WS 14:16:43 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:16:43 10 เมษายน 2561 :try to logon with: GS1WS 14:19:40 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:19:40 10 เมษายน 2561 :try to logon with: GS1WS 14:25:10 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:25:10 10 เมษายน 2561 :try to logon with: GS1WS 14:30:18 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:30:18 10 เมษายน 2561 :try to logon with: GS1WS 14:31:20 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:31:20 10 เมษายน 2561 :try to logon with: GS1WS 14:36:12 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:36:12 10 เมษายน 2561 :try to logon with: GS1WS 14:36:21 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:36:21 10 เมษายน 2561 :try to logon with: GS1WS 14:38:13 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:38:13 10 เมษายน 2561 :try to logon with: GS1WS 14:38:47 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:38:47 10 เมษายน 2561 :try to logon with: GS1WS 14:42:18 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:42:18 10 เมษายน 2561 :try to logon with: GS1WS 14:43:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:43:17 10 เมษายน 2561 :try to logon with: GS1WS 14:44:12 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:44:12 10 เมษายน 2561 :try to logon with: GS1WS 14:49:49 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:49:49 10 เมษายน 2561 :try to logon with: GS1WS 14:53:51 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:53:51 10 เมษายน 2561 :try to logon with: GS1WS 14:55:33 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:55:33 10 เมษายน 2561 :try to logon with: GS1WS 14:57:10 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:57:10 10 เมษายน 2561 :try to logon with: GS1WS 14:58:33 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:58:33 10 เมษายน 2561 :try to logon with: GS1WS 14:59:33 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:59:33 10 เมษายน 2561 :try to logon with: GS1WS 15:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:00:17 10 เมษายน 2561 :try to logon with: GS1WS 15:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 15:03:29 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:03:29 10 เมษายน 2561 :try to logon with: GS1WS 15:19:13 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:19:13 10 เมษายน 2561 :try to logon with: GS1WS 15:20:45 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:20:45 10 เมษายน 2561 :try to logon with: GS1WS 15:21:32 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:21:32 10 เมษายน 2561 :try to logon with: GS1WS 15:22:09 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:22:09 10 เมษายน 2561 :try to logon with: GS1WS 15:22:53 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:22:53 10 เมษายน 2561 :try to logon with: GS1WS 15:23:36 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:23:36 10 เมษายน 2561 :try to logon with: GS1WS 15:25:56 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:25:56 10 เมษายน 2561 :try to logon with: GS1WS 15:29:04 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:29:04 10 เมษายน 2561 :try to logon with: GS1WS 15:33:54 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:33:54 10 เมษายน 2561 :try to logon with: GS1WS 15:40:19 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:40:19 10 เมษายน 2561 :try to logon with: GS1WS 15:43:14 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:43:14 10 เมษายน 2561 :try to logon with: GS1WS 15:50:20 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:50:20 10 เมษายน 2561 :try to logon with: GS1WS 15:51:58 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:51:58 10 เมษายน 2561 :try to logon with: GS1WS 15:52:37 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:52:37 10 เมษายน 2561 :try to logon with: GS1WS 15:53:16 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:53:16 10 เมษายน 2561 :try to logon with: GS1WS 15:54:01 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:54:01 10 เมษายน 2561 :try to logon with: GS1WS 15:54:41 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:54:41 10 เมษายน 2561 :try to logon with: GS1WS 15:55:30 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:55:30 10 เมษายน 2561 :try to logon with: GS1WS 15:55:55 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:55:55 10 เมษายน 2561 :try to logon with: GS1WS 15:57:56 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:57:56 10 เมษายน 2561 :try to logon with: GS1WS 15:58:40 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:58:40 10 เมษายน 2561 :try to logon with: GS1WS 16:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:00:17 10 เมษายน 2561 :try to logon with: GS1WS 16:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 16:00:52 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:00:52 10 เมษายน 2561 :try to logon with: GS1WS 16:03:11 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:03:11 10 เมษายน 2561 :try to logon with: GS1WS 16:12:22 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:12:22 10 เมษายน 2561 :try to logon with: GS1WS 16:13:31 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:13:31 10 เมษายน 2561 :try to logon with: GS1WS 16:14:18 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:14:18 10 เมษายน 2561 :try to logon with: GS1WS 16:14:19 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:14:19 10 เมษายน 2561 :try to logon with: GS1WS 16:15:12 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:15:12 10 เมษายน 2561 :try to logon with: GS1WS 16:15:54 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:15:54 10 เมษายน 2561 :try to logon with: GS1WS 16:16:33 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:16:33 10 เมษายน 2561 :try to logon with: GS1WS 16:17:13 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:17:13 10 เมษายน 2561 :try to logon with: GS1WS 16:29:27 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:29:27 10 เมษายน 2561 :try to logon with: GS1WS 16:31:49 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:31:49 10 เมษายน 2561 :try to logon with: GS1WS 16:32:47 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:32:47 10 เมษายน 2561 :try to logon with: GS1WS 16:33:36 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:33:36 10 เมษายน 2561 :try to logon with: GS1WS 16:34:18 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:34:18 10 เมษายน 2561 :try to logon with: GS1WS 16:37:55 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:37:55 10 เมษายน 2561 :try to logon with: GS1WS 16:40:52 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:40:52 10 เมษายน 2561 :try to logon with: GS1WS 16:42:15 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:42:15 10 เมษายน 2561 :try to logon with: GS1WS 16:42:24 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:42:24 10 เมษายน 2561 :try to logon with: GS1WS 16:44:00 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:44:00 10 เมษายน 2561 :try to logon with: GS1WS 16:45:45 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:45:45 10 เมษายน 2561 :try to logon with: GS1WS 16:45:59 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:45:59 10 เมษายน 2561 :try to logon with: GS1WS 16:46:42 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:46:42 10 เมษายน 2561 :try to logon with: GS1WS 16:47:41 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:47:41 10 เมษายน 2561 :try to logon with: GS1WS 16:47:44 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:47:44 10 เมษายน 2561 :try to logon with: GS1WS 16:48:30 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:48:30 10 เมษายน 2561 :try to logon with: GS1WS 16:49:14 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:49:14 10 เมษายน 2561 :try to logon with: GS1WS 16:50:58 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:50:58 10 เมษายน 2561 :try to logon with: GS1WS 16:51:30 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:51:30 10 เมษายน 2561 :try to logon with: GS1WS 16:52:48 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:52:48 10 เมษายน 2561 :try to logon with: GS1WS 16:53:30 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:53:30 10 เมษายน 2561 :try to logon with: GS1WS 16:54:29 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:54:29 10 เมษายน 2561 :try to logon with: GS1WS 16:56:19 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:56:19 10 เมษายน 2561 :try to logon with: GS1WS 16:56:31 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:56:31 10 เมษายน 2561 :try to logon with: GS1WS 17:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:00:17 10 เมษายน 2561 :try to logon with: GS1WS 17:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 17:05:16 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:05:16 10 เมษายน 2561 :try to logon with: GS1WS 17:07:04 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:07:04 10 เมษายน 2561 :try to logon with: GS1WS 17:08:27 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:08:27 10 เมษายน 2561 :try to logon with: GS1WS 17:09:09 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:09:09 10 เมษายน 2561 :try to logon with: GS1WS 17:09:56 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:09:56 10 เมษายน 2561 :try to logon with: GS1WS 17:11:47 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:11:47 10 เมษายน 2561 :try to logon with: GS1WS 17:12:41 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:12:41 10 เมษายน 2561 :try to logon with: GS1WS 17:13:26 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:13:26 10 เมษายน 2561 :try to logon with: GS1WS 17:15:38 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:15:38 10 เมษายน 2561 :try to logon with: GS1WS 17:16:40 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:16:40 10 เมษายน 2561 :try to logon with: GS1WS 17:17:20 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:17:20 10 เมษายน 2561 :try to logon with: GS1WS 17:18:28 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:18:28 10 เมษายน 2561 :try to logon with: GS1WS 17:19:08 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:19:08 10 เมษายน 2561 :try to logon with: GS1WS 17:19:48 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:19:48 10 เมษายน 2561 :try to logon with: GS1WS 17:20:26 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:20:26 10 เมษายน 2561 :try to logon with: GS1WS 17:21:09 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:21:09 10 เมษายน 2561 :try to logon with: GS1WS 17:26:28 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:26:28 10 เมษายน 2561 :try to logon with: GS1WS 17:29:07 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:29:07 10 เมษายน 2561 :try to logon with: GS1WS 17:30:39 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:30:39 10 เมษายน 2561 :try to logon with: GS1WS 17:43:09 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:43:09 10 เมษายน 2561 :try to logon with: GS1WS 17:48:39 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:48:39 10 เมษายน 2561 :try to logon with: GS1WS 17:49:53 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:49:53 10 เมษายน 2561 :try to logon with: GS1WS 17:54:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:54:17 10 เมษายน 2561 :try to logon with: GS1WS 17:56:01 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:56:01 10 เมษายน 2561 :try to logon with: GS1WS 17:56:59 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:56:59 10 เมษายน 2561 :try to logon with: GS1WS 17:58:10 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:58:10 10 เมษายน 2561 :try to logon with: GS1WS 17:58:57 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:58:57 10 เมษายน 2561 :try to logon with: GS1WS 17:59:41 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:59:41 10 เมษายน 2561 :try to logon with: GS1WS 18:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:00:17 10 เมษายน 2561 :try to logon with: GS1WS 18:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 18:00:20 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:00:20 10 เมษายน 2561 :try to logon with: GS1WS 18:01:03 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:01:03 10 เมษายน 2561 :try to logon with: GS1WS 18:01:41 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:01:41 10 เมษายน 2561 :try to logon with: GS1WS 18:03:42 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:03:42 10 เมษายน 2561 :try to logon with: GS1WS 18:05:09 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:05:09 10 เมษายน 2561 :try to logon with: GS1WS 18:11:49 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:11:49 10 เมษายน 2561 :try to logon with: GS1WS 18:12:29 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:12:29 10 เมษายน 2561 :try to logon with: GS1WS 18:13:15 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:13:15 10 เมษายน 2561 :try to logon with: GS1WS 18:13:57 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:13:57 10 เมษายน 2561 :try to logon with: GS1WS 18:14:40 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:14:40 10 เมษายน 2561 :try to logon with: GS1WS 18:16:32 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:16:32 10 เมษายน 2561 :try to logon with: GS1WS 19:00:20 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:00:20 10 เมษายน 2561 :try to logon with: GS1WS 19:00:20 10 เมษายน 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:20 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 19:56:19 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:56:19 10 เมษายน 2561 :try to logon with: GS1WS 20:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 20:00:17 10 เมษายน 2561 :try to logon with: GS1WS 20:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 21:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 21:00:17 10 เมษายน 2561 :try to logon with: GS1WS 21:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 22:00:21 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:00:21 10 เมษายน 2561 :try to logon with: GS1WS 22:00:21 10 เมษายน 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:21 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 23:00:17 10 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:00:17 10 เมษายน 2561 :try to logon with: GS1WS 23:00:17 10 เมษายน 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:17 10 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database.