0:00:27 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 0:00:27 4 เมษายน 2561 :try to logon with: GS1WS 0:00:27 4 เมษายน 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:27 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 1:00:25 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 1:00:25 4 เมษายน 2561 :try to logon with: GS1WS 1:00:25 4 เมษายน 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:25 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 2:00:21 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 2:00:21 4 เมษายน 2561 :try to logon with: GS1WS 2:00:21 4 เมษายน 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:21 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 3:00:25 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 3:00:25 4 เมษายน 2561 :try to logon with: GS1WS 3:00:25 4 เมษายน 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:25 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 4:00:21 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 4:00:21 4 เมษายน 2561 :try to logon with: GS1WS 4:00:21 4 เมษายน 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:21 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 5:00:21 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 5:00:21 4 เมษายน 2561 :try to logon with: GS1WS 5:00:21 4 เมษายน 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:21 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 6:00:23 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:00:23 4 เมษายน 2561 :try to logon with: GS1WS 6:00:23 4 เมษายน 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:23 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 7:00:21 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 7:00:21 4 เมษายน 2561 :try to logon with: GS1WS 7:00:21 4 เมษายน 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:21 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 8:00:21 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:00:21 4 เมษายน 2561 :try to logon with: GS1WS 8:00:21 4 เมษายน 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:21 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 9:00:24 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:00:24 4 เมษายน 2561 :try to logon with: GS1WS 9:00:25 4 เมษายน 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:25 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 9:06:44 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:06:44 4 เมษายน 2561 :try to logon with: GS1WS 9:09:11 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:09:11 4 เมษายน 2561 :try to logon with: GS1WS 9:12:17 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:12:17 4 เมษายน 2561 :try to logon with: GS1WS 9:15:26 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:15:26 4 เมษายน 2561 :try to logon with: GS1WS 9:25:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:25:50 4 เมษายน 2561 :try to logon with: GS1WS 9:27:07 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:27:07 4 เมษายน 2561 :try to logon with: GS1WS 9:32:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:32:56 4 เมษายน 2561 :try to logon with: GS1WS 9:33:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:33:52 4 เมษายน 2561 :try to logon with: GS1WS 9:34:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:34:56 4 เมษายน 2561 :try to logon with: GS1WS 9:35:25 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:35:25 4 เมษายน 2561 :try to logon with: GS1WS 9:35:41 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:35:41 4 เมษายน 2561 :try to logon with: GS1WS 9:36:15 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:36:15 4 เมษายน 2561 :try to logon with: GS1WS 9:37:36 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:37:36 4 เมษายน 2561 :try to logon with: GS1WS 9:38:45 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:38:45 4 เมษายน 2561 :try to logon with: GS1WS 9:41:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:41:50 4 เมษายน 2561 :try to logon with: GS1WS 9:59:01 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:59:01 4 เมษายน 2561 :try to logon with: GS1WS 10:00:24 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:00:24 4 เมษายน 2561 :try to logon with: GS1WS 10:00:24 4 เมษายน 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:24 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 10:18:38 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:18:38 4 เมษายน 2561 :try to logon with: GS1WS 10:46:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:49 4 เมษายน 2561 :try to logon with: GS1WS 10:46:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:49 4 เมษายน 2561 :try to logon with: GS1WS 10:46:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:49 4 เมษายน 2561 :try to logon with: GS1WS 10:46:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:49 4 เมษายน 2561 :try to logon with: GS1WS 10:46:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:50 4 เมษายน 2561 :try to logon with: GS1WS 10:46:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:50 4 เมษายน 2561 :try to logon with: GS1WS 10:46:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:50 4 เมษายน 2561 :try to logon with: GS1WS 10:46:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:50 4 เมษายน 2561 :try to logon with: GS1WS 10:46:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:50 4 เมษายน 2561 :try to logon with: GS1WS 10:46:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:50 4 เมษายน 2561 :try to logon with: GS1WS 10:46:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:50 4 เมษายน 2561 :try to logon with: GS1WS 10:46:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:50 4 เมษายน 2561 :try to logon with: GS1WS 10:46:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:51 4 เมษายน 2561 :try to logon with: GS1WS 10:46:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:51 4 เมษายน 2561 :try to logon with: GS1WS 10:46:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:51 4 เมษายน 2561 :try to logon with: GS1WS 10:46:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:51 4 เมษายน 2561 :try to logon with: GS1WS 10:46:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:51 4 เมษายน 2561 :try to logon with: GS1WS 10:46:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:51 4 เมษายน 2561 :try to logon with: GS1WS 10:46:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:51 4 เมษายน 2561 :try to logon with: GS1WS 10:46:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:52 4 เมษายน 2561 :try to logon with: GS1WS 10:46:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:52 4 เมษายน 2561 :try to logon with: GS1WS 10:46:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:52 4 เมษายน 2561 :try to logon with: GS1WS 10:46:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:52 4 เมษายน 2561 :try to logon with: GS1WS 10:46:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:52 4 เมษายน 2561 :try to logon with: GS1WS 10:46:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:52 4 เมษายน 2561 :try to logon with: GS1WS 10:46:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:52 4 เมษายน 2561 :try to logon with: GS1WS 10:46:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:52 4 เมษายน 2561 :try to logon with: GS1WS 10:46:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:53 4 เมษายน 2561 :try to logon with: GS1WS 10:46:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:53 4 เมษายน 2561 :try to logon with: GS1WS 10:46:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:53 4 เมษายน 2561 :try to logon with: GS1WS 10:46:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:53 4 เมษายน 2561 :try to logon with: GS1WS 10:46:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:53 4 เมษายน 2561 :try to logon with: GS1WS 10:46:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:53 4 เมษายน 2561 :try to logon with: GS1WS 10:46:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:53 4 เมษายน 2561 :try to logon with: GS1WS 10:46:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:54 4 เมษายน 2561 :try to logon with: GS1WS 10:46:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:54 4 เมษายน 2561 :try to logon with: GS1WS 10:46:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:54 4 เมษายน 2561 :try to logon with: GS1WS 10:46:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:54 4 เมษายน 2561 :try to logon with: GS1WS 10:46:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:54 4 เมษายน 2561 :try to logon with: GS1WS 10:46:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:54 4 เมษายน 2561 :try to logon with: GS1WS 10:46:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:54 4 เมษายน 2561 :try to logon with: GS1WS 10:46:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:55 4 เมษายน 2561 :try to logon with: GS1WS 10:46:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:55 4 เมษายน 2561 :try to logon with: GS1WS 10:46:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:55 4 เมษายน 2561 :try to logon with: GS1WS 10:46:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:55 4 เมษายน 2561 :try to logon with: GS1WS 10:46:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:55 4 เมษายน 2561 :try to logon with: GS1WS 10:46:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:55 4 เมษายน 2561 :try to logon with: GS1WS 10:46:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:55 4 เมษายน 2561 :try to logon with: GS1WS 10:46:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:56 4 เมษายน 2561 :try to logon with: GS1WS 10:46:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:56 4 เมษายน 2561 :try to logon with: GS1WS 10:46:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:56 4 เมษายน 2561 :try to logon with: GS1WS 10:46:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:56 4 เมษายน 2561 :try to logon with: GS1WS 10:46:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:56 4 เมษายน 2561 :try to logon with: GS1WS 10:46:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:56 4 เมษายน 2561 :try to logon with: GS1WS 10:46:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:56 4 เมษายน 2561 :try to logon with: GS1WS 10:46:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:57 4 เมษายน 2561 :try to logon with: GS1WS 10:46:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:57 4 เมษายน 2561 :try to logon with: GS1WS 10:46:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:57 4 เมษายน 2561 :try to logon with: GS1WS 10:46:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:57 4 เมษายน 2561 :try to logon with: GS1WS 10:46:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:57 4 เมษายน 2561 :try to logon with: GS1WS 10:46:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:57 4 เมษายน 2561 :try to logon with: GS1WS 10:46:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:57 4 เมษายน 2561 :try to logon with: GS1WS 10:46:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:57 4 เมษายน 2561 :try to logon with: GS1WS 10:46:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:58 4 เมษายน 2561 :try to logon with: GS1WS 10:46:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:58 4 เมษายน 2561 :try to logon with: GS1WS 10:46:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:58 4 เมษายน 2561 :try to logon with: GS1WS 10:46:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:58 4 เมษายน 2561 :try to logon with: GS1WS 10:46:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:58 4 เมษายน 2561 :try to logon with: GS1WS 10:46:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:58 4 เมษายน 2561 :try to logon with: GS1WS 10:46:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:58 4 เมษายน 2561 :try to logon with: GS1WS 10:46:59 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:59 4 เมษายน 2561 :try to logon with: GS1WS 10:46:59 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:59 4 เมษายน 2561 :try to logon with: GS1WS 10:46:59 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:59 4 เมษายน 2561 :try to logon with: GS1WS 10:46:59 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:59 4 เมษายน 2561 :try to logon with: GS1WS 10:46:59 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:59 4 เมษายน 2561 :try to logon with: GS1WS 10:46:59 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:46:59 4 เมษายน 2561 :try to logon with: GS1WS 10:47:00 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:47:00 4 เมษายน 2561 :try to logon with: GS1WS 10:47:00 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:47:00 4 เมษายน 2561 :try to logon with: GS1WS 10:47:00 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:47:00 4 เมษายน 2561 :try to logon with: GS1WS 10:49:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:49 4 เมษายน 2561 :try to logon with: GS1WS 10:49:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:49 4 เมษายน 2561 :try to logon with: GS1WS 10:49:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:49 4 เมษายน 2561 :try to logon with: GS1WS 10:49:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:49 4 เมษายน 2561 :try to logon with: GS1WS 10:49:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:49 4 เมษายน 2561 :try to logon with: GS1WS 10:49:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:49 4 เมษายน 2561 :try to logon with: GS1WS 10:49:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:49 4 เมษายน 2561 :try to logon with: GS1WS 10:49:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:49 4 เมษายน 2561 :try to logon with: GS1WS 10:49:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:50 4 เมษายน 2561 :try to logon with: GS1WS 10:49:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:50 4 เมษายน 2561 :try to logon with: GS1WS 10:49:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:50 4 เมษายน 2561 :try to logon with: GS1WS 10:49:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:50 4 เมษายน 2561 :try to logon with: GS1WS 10:49:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:50 4 เมษายน 2561 :try to logon with: GS1WS 10:49:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:50 4 เมษายน 2561 :try to logon with: GS1WS 10:49:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:50 4 เมษายน 2561 :try to logon with: GS1WS 10:49:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:50 4 เมษายน 2561 :try to logon with: GS1WS 10:49:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:51 4 เมษายน 2561 :try to logon with: GS1WS 10:49:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:51 4 เมษายน 2561 :try to logon with: GS1WS 10:49:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:51 4 เมษายน 2561 :try to logon with: GS1WS 10:49:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:51 4 เมษายน 2561 :try to logon with: GS1WS 10:49:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:51 4 เมษายน 2561 :try to logon with: GS1WS 10:49:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:51 4 เมษายน 2561 :try to logon with: GS1WS 10:49:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:51 4 เมษายน 2561 :try to logon with: GS1WS 10:49:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:51 4 เมษายน 2561 :try to logon with: GS1WS 10:49:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:52 4 เมษายน 2561 :try to logon with: GS1WS 10:49:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:52 4 เมษายน 2561 :try to logon with: GS1WS 10:49:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:52 4 เมษายน 2561 :try to logon with: GS1WS 10:49:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:52 4 เมษายน 2561 :try to logon with: GS1WS 10:49:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:52 4 เมษายน 2561 :try to logon with: GS1WS 10:49:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:52 4 เมษายน 2561 :try to logon with: GS1WS 10:49:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:52 4 เมษายน 2561 :try to logon with: GS1WS 10:49:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:52 4 เมษายน 2561 :try to logon with: GS1WS 10:49:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:52 4 เมษายน 2561 :try to logon with: GS1WS 10:49:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:53 4 เมษายน 2561 :try to logon with: GS1WS 10:49:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:53 4 เมษายน 2561 :try to logon with: GS1WS 10:49:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:53 4 เมษายน 2561 :try to logon with: GS1WS 10:49:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:53 4 เมษายน 2561 :try to logon with: GS1WS 10:49:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:53 4 เมษายน 2561 :try to logon with: GS1WS 10:49:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:53 4 เมษายน 2561 :try to logon with: GS1WS 10:49:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:53 4 เมษายน 2561 :try to logon with: GS1WS 10:49:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:53 4 เมษายน 2561 :try to logon with: GS1WS 10:49:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:54 4 เมษายน 2561 :try to logon with: GS1WS 10:49:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:54 4 เมษายน 2561 :try to logon with: GS1WS 10:49:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:54 4 เมษายน 2561 :try to logon with: GS1WS 10:49:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:54 4 เมษายน 2561 :try to logon with: GS1WS 10:49:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:54 4 เมษายน 2561 :try to logon with: GS1WS 10:49:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:54 4 เมษายน 2561 :try to logon with: GS1WS 10:49:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:54 4 เมษายน 2561 :try to logon with: GS1WS 10:49:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:54 4 เมษายน 2561 :try to logon with: GS1WS 10:49:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:55 4 เมษายน 2561 :try to logon with: GS1WS 10:49:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:55 4 เมษายน 2561 :try to logon with: GS1WS 10:49:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:55 4 เมษายน 2561 :try to logon with: GS1WS 10:49:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:55 4 เมษายน 2561 :try to logon with: GS1WS 10:49:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:55 4 เมษายน 2561 :try to logon with: GS1WS 10:49:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:55 4 เมษายน 2561 :try to logon with: GS1WS 10:49:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:55 4 เมษายน 2561 :try to logon with: GS1WS 10:49:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:55 4 เมษายน 2561 :try to logon with: GS1WS 10:49:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:56 4 เมษายน 2561 :try to logon with: GS1WS 10:49:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:56 4 เมษายน 2561 :try to logon with: GS1WS 10:49:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:56 4 เมษายน 2561 :try to logon with: GS1WS 10:49:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:56 4 เมษายน 2561 :try to logon with: GS1WS 10:49:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:56 4 เมษายน 2561 :try to logon with: GS1WS 10:49:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:56 4 เมษายน 2561 :try to logon with: GS1WS 10:49:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:56 4 เมษายน 2561 :try to logon with: GS1WS 10:49:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:57 4 เมษายน 2561 :try to logon with: GS1WS 10:49:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:57 4 เมษายน 2561 :try to logon with: GS1WS 10:49:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:57 4 เมษายน 2561 :try to logon with: GS1WS 10:49:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:57 4 เมษายน 2561 :try to logon with: GS1WS 10:49:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:57 4 เมษายน 2561 :try to logon with: GS1WS 10:49:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:57 4 เมษายน 2561 :try to logon with: GS1WS 10:49:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:57 4 เมษายน 2561 :try to logon with: GS1WS 10:49:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:57 4 เมษายน 2561 :try to logon with: GS1WS 10:49:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:58 4 เมษายน 2561 :try to logon with: GS1WS 10:49:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:58 4 เมษายน 2561 :try to logon with: GS1WS 10:49:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:58 4 เมษายน 2561 :try to logon with: GS1WS 10:49:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:58 4 เมษายน 2561 :try to logon with: GS1WS 10:49:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:58 4 เมษายน 2561 :try to logon with: GS1WS 10:49:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:58 4 เมษายน 2561 :try to logon with: GS1WS 10:49:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:49:58 4 เมษายน 2561 :try to logon with: GS1WS 11:00:27 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:00:27 4 เมษายน 2561 :try to logon with: GS1WS 11:00:27 4 เมษายน 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:27 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 11:00:28 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:00:28 4 เมษายน 2561 :try to logon with: GS1WS 11:00:28 4 เมษายน 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:28 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 11:34:21 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:34:21 4 เมษายน 2561 :try to logon with: GS1WS 11:35:59 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:35:59 4 เมษายน 2561 :try to logon with: GS1WS 11:56:14 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:56:14 4 เมษายน 2561 :try to logon with: GS1WS 11:56:14 4 เมษายน 2561 :getGS1validate=--DECLARE @GLN varchar(13) = '8858998599998' --DECLARE @GTIN varchar(13) = '8858998600000' DECLARE @NO_PREFIX varchar(3) DECLARE @NO_XXXC varchar(10) SELECT TOP 1 @NO_PREFIX=NO_PREFIX, @NO_XXXC=NO_XXXC FROM MB_EAN13 WHERE cast(@GLN as bigint) BETWEEN RANG_FROM AND RANG_TO --PRINT '@NO_PREFIX=' + ISNULL(@NO_PREFIX,'NULL') --PRINT '@NO_XXXC=' + ISNULL(@NO_XXXC,'NULL') --PRINT LEFT(@GTIN, LEN(@GTIN) - LEN(@NO_XXXC)) + REPLACE(REPLACE(@NO_XXXC, 'C', 0), 'X', 0) SELECT COUNT('A') FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE WHERE MB_MEMBER.MEMBER_CODE IS NOT NULL AND MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300' AND MB_MEMBER.MEMBER_STATUS_CODE = 'A' AND LEFT(MB_MEMBER.MEMBER_CODE, LEN(@NO_PREFIX)) = @NO_PREFIX AND MB_MEMBER.MEMBER_CODE like @GLN AND MB_MEMBER.MEMBER_CODE BETWEEN LEFT(@GTIN, LEN(@GTIN) - LEN(@NO_XXXC)) + REPLACE(REPLACE(@NO_XXXC, 'C', 0), 'X', 0) AND LEFT(@GTIN, LEN(@GTIN) - LEN(@NO_XXXC)) + REPLACE(REPLACE(@NO_XXXC, 'C', 9), 'X', 9) 11:56:14 4 เมษายน 2561 :Error converting data type nvarchar to bigint. 11:56:14 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:56:14 4 เมษายน 2561 :try to logon with: GS1WS 11:56:14 4 เมษายน 2561 :getGS1validate=--DECLARE @GLN varchar(13) = '8858998599998' --DECLARE @GTIN varchar(13) = '8858998600000' DECLARE @NO_PREFIX varchar(3) DECLARE @NO_XXXC varchar(10) SELECT TOP 1 @NO_PREFIX=NO_PREFIX, @NO_XXXC=NO_XXXC FROM MB_EAN13 WHERE cast(@GLN as bigint) BETWEEN RANG_FROM AND RANG_TO --PRINT '@NO_PREFIX=' + ISNULL(@NO_PREFIX,'NULL') --PRINT '@NO_XXXC=' + ISNULL(@NO_XXXC,'NULL') --PRINT LEFT(@GTIN, LEN(@GTIN) - LEN(@NO_XXXC)) + REPLACE(REPLACE(@NO_XXXC, 'C', 0), 'X', 0) SELECT COUNT('A') FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE WHERE MB_MEMBER.MEMBER_CODE IS NOT NULL AND MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300' AND MB_MEMBER.MEMBER_STATUS_CODE = 'A' AND LEFT(MB_MEMBER.MEMBER_CODE, LEN(@NO_PREFIX)) = @NO_PREFIX AND MB_MEMBER.MEMBER_CODE like @GLN AND MB_MEMBER.MEMBER_CODE BETWEEN LEFT(@GTIN, LEN(@GTIN) - LEN(@NO_XXXC)) + REPLACE(REPLACE(@NO_XXXC, 'C', 0), 'X', 0) AND LEFT(@GTIN, LEN(@GTIN) - LEN(@NO_XXXC)) + REPLACE(REPLACE(@NO_XXXC, 'C', 9), 'X', 9) 11:56:14 4 เมษายน 2561 :Error converting data type nvarchar to bigint. 11:56:15 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:56:15 4 เมษายน 2561 :try to logon with: GS1WS 11:56:15 4 เมษายน 2561 :getGS1validate=--DECLARE @GLN varchar(13) = '8858998599998' --DECLARE @GTIN varchar(13) = '8858998600000' DECLARE @NO_PREFIX varchar(3) DECLARE @NO_XXXC varchar(10) SELECT TOP 1 @NO_PREFIX=NO_PREFIX, @NO_XXXC=NO_XXXC FROM MB_EAN13 WHERE cast(@GLN as bigint) BETWEEN RANG_FROM AND RANG_TO --PRINT '@NO_PREFIX=' + ISNULL(@NO_PREFIX,'NULL') --PRINT '@NO_XXXC=' + ISNULL(@NO_XXXC,'NULL') --PRINT LEFT(@GTIN, LEN(@GTIN) - LEN(@NO_XXXC)) + REPLACE(REPLACE(@NO_XXXC, 'C', 0), 'X', 0) SELECT COUNT('A') FROM MB_MEMBER INNER JOIN MB_COMP_PERSON ON MB_MEMBER.COMP_PERSON_CODE = MB_COMP_PERSON.COMP_PERSON_CODE WHERE MB_MEMBER.MEMBER_CODE IS NOT NULL AND MB_MEMBER.MEMBER_MAIN_GROUP_CODE = '300' AND MB_MEMBER.MEMBER_STATUS_CODE = 'A' AND LEFT(MB_MEMBER.MEMBER_CODE, LEN(@NO_PREFIX)) = @NO_PREFIX AND MB_MEMBER.MEMBER_CODE like @GLN AND MB_MEMBER.MEMBER_CODE BETWEEN LEFT(@GTIN, LEN(@GTIN) - LEN(@NO_XXXC)) + REPLACE(REPLACE(@NO_XXXC, 'C', 0), 'X', 0) AND LEFT(@GTIN, LEN(@GTIN) - LEN(@NO_XXXC)) + REPLACE(REPLACE(@NO_XXXC, 'C', 9), 'X', 9) 11:56:15 4 เมษายน 2561 :Error converting data type nvarchar to bigint. 12:00:22 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:00:22 4 เมษายน 2561 :try to logon with: GS1WS 12:00:22 4 เมษายน 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:22 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 12:00:22 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:00:22 4 เมษายน 2561 :try to logon with: GS1WS 12:00:22 4 เมษายน 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:22 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 12:02:41 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:02:41 4 เมษายน 2561 :try to logon with: GS1WS 12:27:44 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:27:44 4 เมษายน 2561 :try to logon with: GS1WS 12:46:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:46:53 4 เมษายน 2561 :try to logon with: GS1WS 12:47:30 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:47:30 4 เมษายน 2561 :try to logon with: GS1WS 12:48:05 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:48:05 4 เมษายน 2561 :try to logon with: GS1WS 12:48:36 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:48:36 4 เมษายน 2561 :try to logon with: GS1WS 12:49:12 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:49:12 4 เมษายน 2561 :try to logon with: GS1WS 12:49:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:49:50 4 เมษายน 2561 :try to logon with: GS1WS 13:00:27 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:00:27 4 เมษายน 2561 :try to logon with: GS1WS 13:00:27 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:00:27 4 เมษายน 2561 :try to logon with: GS1WS 13:00:27 4 เมษายน 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:27 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 13:00:27 4 เมษายน 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:27 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 13:20:10 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:20:10 4 เมษายน 2561 :try to logon with: GS1WS 13:28:36 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:28:36 4 เมษายน 2561 :try to logon with: GS1WS 13:28:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:28:52 4 เมษายน 2561 :try to logon with: GS1WS 13:30:00 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:30:00 4 เมษายน 2561 :try to logon with: GS1WS 13:30:41 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:30:41 4 เมษายน 2561 :try to logon with: GS1WS 13:31:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:31:54 4 เมษายน 2561 :try to logon with: GS1WS 14:00:24 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:00:24 4 เมษายน 2561 :try to logon with: GS1WS 14:00:24 4 เมษายน 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:24 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 14:00:24 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:00:24 4 เมษายน 2561 :try to logon with: GS1WS 14:00:24 4 เมษายน 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:24 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 14:01:21 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:01:21 4 เมษายน 2561 :try to logon with: GS1WS 14:02:43 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:02:43 4 เมษายน 2561 :try to logon with: GS1WS 14:03:17 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:03:17 4 เมษายน 2561 :try to logon with: GS1WS 14:05:44 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:05:44 4 เมษายน 2561 :try to logon with: GS1WS 14:09:02 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:09:02 4 เมษายน 2561 :try to logon with: GS1WS 14:11:22 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:11:22 4 เมษายน 2561 :try to logon with: GS1WS 14:11:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:11:58 4 เมษายน 2561 :try to logon with: GS1WS 14:12:10 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:12:10 4 เมษายน 2561 :try to logon with: GS1WS 14:12:27 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:12:27 4 เมษายน 2561 :try to logon with: GS1WS 14:12:36 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:12:36 4 เมษายน 2561 :try to logon with: GS1WS 14:12:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:12:55 4 เมษายน 2561 :try to logon with: GS1WS 14:40:26 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:40:26 4 เมษายน 2561 :try to logon with: GS1WS 14:42:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:42:58 4 เมษายน 2561 :try to logon with: GS1WS 14:46:57 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:46:57 4 เมษายน 2561 :try to logon with: GS1WS 14:50:31 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:50:31 4 เมษายน 2561 :try to logon with: GS1WS 14:51:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:51:58 4 เมษายน 2561 :try to logon with: GS1WS 14:53:22 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:53:22 4 เมษายน 2561 :try to logon with: GS1WS 14:54:34 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:54:34 4 เมษายน 2561 :try to logon with: GS1WS 14:56:18 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:56:18 4 เมษายน 2561 :try to logon with: GS1WS 15:00:28 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:00:28 4 เมษายน 2561 :try to logon with: GS1WS 15:00:28 4 เมษายน 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:28 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 15:00:28 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:00:28 4 เมษายน 2561 :try to logon with: GS1WS 15:00:28 4 เมษายน 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:28 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 15:21:24 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:21:24 4 เมษายน 2561 :try to logon with: GS1WS 15:24:19 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:24:19 4 เมษายน 2561 :try to logon with: GS1WS 15:25:43 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:25:43 4 เมษายน 2561 :try to logon with: GS1WS 15:25:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:25:50 4 เมษายน 2561 :try to logon with: GS1WS 15:25:59 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:25:59 4 เมษายน 2561 :try to logon with: GS1WS 15:26:39 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:26:39 4 เมษายน 2561 :try to logon with: GS1WS 15:27:36 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:27:36 4 เมษายน 2561 :try to logon with: GS1WS 15:27:50 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:27:50 4 เมษายน 2561 :try to logon with: GS1WS 15:28:08 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:28:08 4 เมษายน 2561 :try to logon with: GS1WS 15:28:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:28:58 4 เมษายน 2561 :try to logon with: GS1WS 15:29:23 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:29:23 4 เมษายน 2561 :try to logon with: GS1WS 15:30:38 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:30:38 4 เมษายน 2561 :try to logon with: GS1WS 15:31:05 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:31:05 4 เมษายน 2561 :try to logon with: GS1WS 15:31:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:31:53 4 เมษายน 2561 :try to logon with: GS1WS 15:31:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:31:54 4 เมษายน 2561 :try to logon with: GS1WS 15:32:00 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:32:00 4 เมษายน 2561 :try to logon with: GS1WS 15:32:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:32:49 4 เมษายน 2561 :try to logon with: GS1WS 15:33:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:33:54 4 เมษายน 2561 :try to logon with: GS1WS 15:34:40 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:34:40 4 เมษายน 2561 :try to logon with: GS1WS 15:36:00 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:36:00 4 เมษายน 2561 :try to logon with: GS1WS 15:40:25 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:40:25 4 เมษายน 2561 :try to logon with: GS1WS 15:41:12 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:41:12 4 เมษายน 2561 :try to logon with: GS1WS 15:42:08 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:42:08 4 เมษายน 2561 :try to logon with: GS1WS 15:42:43 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:42:43 4 เมษายน 2561 :try to logon with: GS1WS 15:48:08 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:48:08 4 เมษายน 2561 :try to logon with: GS1WS 15:50:31 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:50:31 4 เมษายน 2561 :try to logon with: GS1WS 15:50:42 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:50:42 4 เมษายน 2561 :try to logon with: GS1WS 15:51:31 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:51:31 4 เมษายน 2561 :try to logon with: GS1WS 15:52:06 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:52:06 4 เมษายน 2561 :try to logon with: GS1WS 15:52:17 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:52:17 4 เมษายน 2561 :try to logon with: GS1WS 15:53:15 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:53:15 4 เมษายน 2561 :try to logon with: GS1WS 15:53:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:53:53 4 เมษายน 2561 :try to logon with: GS1WS 15:53:56 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:53:56 4 เมษายน 2561 :try to logon with: GS1WS 15:54:27 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:54:27 4 เมษายน 2561 :try to logon with: GS1WS 15:54:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:54:51 4 เมษายน 2561 :try to logon with: GS1WS 15:54:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:54:51 4 เมษายน 2561 :try to logon with: GS1WS 15:55:04 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:55:04 4 เมษายน 2561 :try to logon with: GS1WS 15:55:49 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:55:49 4 เมษายน 2561 :try to logon with: GS1WS 15:56:23 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:56:23 4 เมษายน 2561 :try to logon with: GS1WS 15:56:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:56:58 4 เมษายน 2561 :try to logon with: GS1WS 15:59:09 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:59:09 4 เมษายน 2561 :try to logon with: GS1WS 16:00:20 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:00:20 4 เมษายน 2561 :try to logon with: GS1WS 16:00:20 4 เมษายน 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:20 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 16:00:24 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:00:24 4 เมษายน 2561 :try to logon with: GS1WS 16:00:24 4 เมษายน 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:24 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 16:00:34 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:00:34 4 เมษายน 2561 :try to logon with: GS1WS 16:02:26 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:02:26 4 เมษายน 2561 :try to logon with: GS1WS 16:02:48 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:02:48 4 เมษายน 2561 :try to logon with: GS1WS 16:05:53 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:05:53 4 เมษายน 2561 :try to logon with: GS1WS 16:08:19 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:08:19 4 เมษายน 2561 :try to logon with: GS1WS 16:09:32 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:09:32 4 เมษายน 2561 :try to logon with: GS1WS 16:09:54 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:09:54 4 เมษายน 2561 :try to logon with: GS1WS 16:10:35 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:10:35 4 เมษายน 2561 :try to logon with: GS1WS 16:12:00 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:12:00 4 เมษายน 2561 :try to logon with: GS1WS 16:13:55 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:13:55 4 เมษายน 2561 :try to logon with: GS1WS 16:16:23 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:16:23 4 เมษายน 2561 :try to logon with: GS1WS 16:16:30 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:16:30 4 เมษายน 2561 :try to logon with: GS1WS 16:17:31 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:17:31 4 เมษายน 2561 :try to logon with: GS1WS 16:18:16 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:18:16 4 เมษายน 2561 :try to logon with: GS1WS 16:18:26 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:18:26 4 เมษายน 2561 :try to logon with: GS1WS 16:19:48 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:19:48 4 เมษายน 2561 :try to logon with: GS1WS 16:20:35 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:20:35 4 เมษายน 2561 :try to logon with: GS1WS 16:21:10 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:21:10 4 เมษายน 2561 :try to logon with: GS1WS 16:21:45 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:21:45 4 เมษายน 2561 :try to logon with: GS1WS 16:22:40 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:22:40 4 เมษายน 2561 :try to logon with: GS1WS 16:24:17 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:24:17 4 เมษายน 2561 :try to logon with: GS1WS 16:25:33 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:25:33 4 เมษายน 2561 :try to logon with: GS1WS 16:28:59 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:28:59 4 เมษายน 2561 :try to logon with: GS1WS 16:30:27 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:30:27 4 เมษายน 2561 :try to logon with: GS1WS 16:31:46 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:31:46 4 เมษายน 2561 :try to logon with: GS1WS 16:33:36 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:33:36 4 เมษายน 2561 :try to logon with: GS1WS 16:35:03 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:35:03 4 เมษายน 2561 :try to logon with: GS1WS 16:36:32 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:36:32 4 เมษายน 2561 :try to logon with: GS1WS 16:42:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:42:52 4 เมษายน 2561 :try to logon with: GS1WS 16:43:00 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:43:00 4 เมษายน 2561 :try to logon with: GS1WS 16:51:41 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:51:41 4 เมษายน 2561 :try to logon with: GS1WS 17:00:20 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:00:20 4 เมษายน 2561 :try to logon with: GS1WS 17:00:20 4 เมษายน 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:20 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 17:00:24 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:00:24 4 เมษายน 2561 :try to logon with: GS1WS 17:00:24 4 เมษายน 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:24 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 17:05:22 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:05:22 4 เมษายน 2561 :try to logon with: GS1WS 17:06:02 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:06:02 4 เมษายน 2561 :try to logon with: GS1WS 17:07:07 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:07:07 4 เมษายน 2561 :try to logon with: GS1WS 17:20:08 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:20:08 4 เมษายน 2561 :try to logon with: GS1WS 17:21:09 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:21:09 4 เมษายน 2561 :try to logon with: GS1WS 17:22:04 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:22:04 4 เมษายน 2561 :try to logon with: GS1WS 17:25:17 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:25:17 4 เมษายน 2561 :try to logon with: GS1WS 17:26:25 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:26:25 4 เมษายน 2561 :try to logon with: GS1WS 17:27:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:27:51 4 เมษายน 2561 :try to logon with: GS1WS 17:28:39 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:28:39 4 เมษายน 2561 :try to logon with: GS1WS 17:30:00 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:30:00 4 เมษายน 2561 :try to logon with: GS1WS 17:31:01 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:31:01 4 เมษายน 2561 :try to logon with: GS1WS 17:33:41 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:33:41 4 เมษายน 2561 :try to logon with: GS1WS 17:34:58 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:34:58 4 เมษายน 2561 :try to logon with: GS1WS 17:37:59 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:37:59 4 เมษายน 2561 :try to logon with: GS1WS 17:57:27 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:57:27 4 เมษายน 2561 :try to logon with: GS1WS 17:58:39 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:58:39 4 เมษายน 2561 :try to logon with: GS1WS 17:59:59 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:59:59 4 เมษายน 2561 :try to logon with: GS1WS 18:00:25 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:00:25 4 เมษายน 2561 :try to logon with: GS1WS 18:00:25 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:00:25 4 เมษายน 2561 :try to logon with: GS1WS 18:00:25 4 เมษายน 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:25 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 18:00:25 4 เมษายน 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:25 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 18:01:29 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:01:29 4 เมษายน 2561 :try to logon with: GS1WS 18:02:19 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:02:19 4 เมษายน 2561 :try to logon with: GS1WS 18:03:51 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:03:51 4 เมษายน 2561 :try to logon with: GS1WS 18:05:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:05:52 4 เมษายน 2561 :try to logon with: GS1WS 18:07:07 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:07:07 4 เมษายน 2561 :try to logon with: GS1WS 18:08:30 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:08:30 4 เมษายน 2561 :try to logon with: GS1WS 18:09:21 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:09:21 4 เมษายน 2561 :try to logon with: GS1WS 18:10:08 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:10:08 4 เมษายน 2561 :try to logon with: GS1WS 18:11:06 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:11:06 4 เมษายน 2561 :try to logon with: GS1WS 18:11:52 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:11:52 4 เมษายน 2561 :try to logon with: GS1WS 19:00:24 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:00:24 4 เมษายน 2561 :try to logon with: GS1WS 19:00:24 4 เมษายน 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:24 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 20:00:20 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 20:00:20 4 เมษายน 2561 :try to logon with: GS1WS 20:00:20 4 เมษายน 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:20 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 21:00:20 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 21:00:20 4 เมษายน 2561 :try to logon with: GS1WS 21:00:20 4 เมษายน 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:20 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 22:00:25 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:00:25 4 เมษายน 2561 :try to logon with: GS1WS 22:00:25 4 เมษายน 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:25 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database. 23:00:20 4 เมษายน 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:00:20 4 เมษายน 2561 :try to logon with: GS1WS 23:00:20 4 เมษายน 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:20 4 เมษายน 2561 :There is already an object named 'tempWsGs1_001' in the database.