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