0:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 0:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 0:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 0:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 0:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 0:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 1:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 1:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 1:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 1:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 1:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 1:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 2:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 2:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 2:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 2:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 2:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 2:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 3:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 3:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 3:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 3:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 3:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 4:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 4:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 4:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 4:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 5:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 5:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 5:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 6:29:08 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:29:08 15 พฤษภาคม 2561 :try to logon with: GS1WS 6:29:08 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:29:08 15 พฤษภาคม 2561 :try to logon with: GS1WS 6:31:55 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:31:55 15 พฤษภาคม 2561 :try to logon with: GS1WS 6:31:55 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:31:55 15 พฤษภาคม 2561 :try to logon with: GS1WS 6:35:00 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:35:00 15 พฤษภาคม 2561 :try to logon with: GS1WS 6:35:01 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:35:01 15 พฤษภาคม 2561 :try to logon with: GS1WS 6:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 6:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 7:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 7:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 7:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 7:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 7:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 7:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 8:43:27 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:43:27 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:43:27 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:43:27 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:45:20 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:45:20 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:45:20 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:45:20 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:48:08 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:48:08 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:48:08 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:48:08 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:50:21 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:50:21 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:50:21 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:50:21 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:53:21 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:53:21 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:53:21 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:53:21 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:54:28 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:54:28 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:54:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:54:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:55:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:55:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:55:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:55:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:56:28 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:56:28 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:56:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:56:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:57:58 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:57:58 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:57:58 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:57:58 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:59:24 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:59:24 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:59:24 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:59:24 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:59:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:59:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:59:45 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:59:45 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 8:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 8:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 9:00:04 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:00:04 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:00:04 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:00:04 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:00:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:00:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:00:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:00:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:08:50 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:08:50 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:08:50 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:08:50 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:11:04 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:11:04 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:11:05 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:11:05 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:11:16 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:11:16 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:11:16 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:11:16 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:12:35 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:12:35 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:12:35 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:12:35 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:14:19 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:14:19 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:14:19 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:14:19 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:16:39 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:16:39 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:16:39 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:16:39 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:38:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:38:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:38:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:38:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:41:36 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:41:36 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:41:37 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:41:37 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:42:20 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:42:20 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:42:20 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:42:20 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:42:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:42:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:42:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:42:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:42:45 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:42:45 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:42:45 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:42:45 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:44:18 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:44:18 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:44:18 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:44:18 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:45:02 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:45:02 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:45:02 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:45:02 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:45:43 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:45:43 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:45:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:45:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:46:02 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:46:02 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:46:02 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:46:02 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:46:40 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:46:40 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:46:40 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:46:40 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:47:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:47:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:47:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:47:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:49:45 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:49:45 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:49:45 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:49:45 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:52:06 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:52:06 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:52:06 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:52:06 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:55:16 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:55:16 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:55:16 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:55:16 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:56:25 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:56:25 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:56:25 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:56:25 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:57:24 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:57:24 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:57:25 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:57:25 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:59:11 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:59:11 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:59:12 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:59:12 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:59:57 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:59:57 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:59:57 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:59:57 15 พฤษภาคม 2561 :try to logon with: GS1WS 9:59:57 15 พฤษภาคม 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:59:57 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 9:59:57 15 พฤษภาคม 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:59:57 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 9:59:57 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:59:57 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:00:42 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:00:42 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:00:42 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:00:42 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:00:43 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:00:43 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:00:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:00:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:01:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:01:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:01:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:01:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:02:34 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:02:34 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:02:35 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:02:35 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:02:47 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:02:47 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:02:47 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:02:47 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:03:22 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:03:22 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:03:22 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:03:22 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:04:08 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:04:08 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:04:08 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:04:08 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:04:34 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:04:34 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:04:35 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:04:35 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:04:47 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:04:47 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:04:47 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:04:47 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:05:07 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:05:07 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:05:07 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:05:07 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:05:26 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:05:26 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:05:26 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:05:26 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:06:11 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:06:11 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:06:12 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:06:12 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:06:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:06:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:06:57 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:06:57 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:08:01 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:08:01 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:08:02 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:08:02 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:08:23 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:08:23 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:08:24 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:08:24 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:09:08 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:09:08 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:09:08 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:09:08 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:09:53 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:09:53 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:09:53 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:09:53 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:10:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:10:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:10:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:10:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:12:36 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:12:36 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:12:36 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:12:36 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:14:53 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:14:53 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:14:53 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:14:53 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:14:55 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:14:55 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:14:55 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:14:55 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:17:10 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:17:10 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:17:10 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:17:10 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:19:08 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:19:08 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:19:09 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:19:09 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:20:43 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:20:43 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:20:43 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:20:43 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:26:30 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:26:30 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:26:31 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:26:31 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:26:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:26:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:26:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:26:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:28:51 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:28:51 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:28:51 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:28:51 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:39:03 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:39:03 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:39:03 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:39:03 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:40:03 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:40:03 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:40:03 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:40:03 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:41:04 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:41:04 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:41:05 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:41:05 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:43:47 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:43:47 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:43:48 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:43:48 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:58:37 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:58:37 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:58:37 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:58:37 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 10:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 11:00:27 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:00:27 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:00:27 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:00:27 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:11:25 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:11:25 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:11:26 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:11:26 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:50:03 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:50:03 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:50:04 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:50:04 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:50:36 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:50:36 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:50:36 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:50:36 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:53:37 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:53:37 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:53:37 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:53:37 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:55:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:55:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:55:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:55:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:58:22 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:58:22 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:58:22 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:58:22 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:59:11 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:59:11 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:59:11 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:59:11 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 11:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 12:00:25 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:00:25 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:00:25 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:00:25 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:02:26 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:02:26 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:02:27 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:02:27 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:02:28 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:02:28 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:02:28 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:02:28 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:04:18 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:04:18 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:04:18 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:04:18 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:06:42 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:06:42 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:06:42 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:06:42 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:12:20 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:12:20 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:12:20 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:12:20 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:13:06 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:13:06 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:13:06 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:13:06 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:13:28 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:13:28 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:13:28 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:13:28 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:13:46 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:13:46 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:13:46 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:13:46 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:14:04 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:14:04 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:14:04 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:14:04 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:57:01 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:57:01 15 พฤษภาคม 2561 :try to logon with: GS1WS 12:57:01 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:57:01 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:00:02 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:00:02 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:00:02 15 พฤษภาคม 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:02 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 13:00:02 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:00:02 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:00:02 15 พฤษภาคม 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:02 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 13:08:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:08:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:08:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:08:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:14:46 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:14:46 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:14:46 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:14:46 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:19:26 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:19:26 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:19:26 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:19:26 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:21:53 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:21:53 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:21:53 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:21:53 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:29:36 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:29:36 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:29:36 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:29:36 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:30:58 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:30:58 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:30:59 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:30:59 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:36:27 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:36:27 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:36:27 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:36:27 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:37:00 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:37:00 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:37:01 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:37:01 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:37:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:37:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:37:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:37:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:38:38 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:38:38 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:38:38 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:38:38 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:39:19 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:39:19 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:39:20 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:39:20 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:43:06 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:43:06 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:43:06 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:43:06 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:48:42 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:48:42 15 พฤษภาคม 2561 :try to logon with: GS1WS 13:48:42 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:48:42 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:00:00 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:00:00 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:00:00 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:00:00 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:00:00 15 พฤษภาคม 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:00 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 14:00:00 15 พฤษภาคม 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:00 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 14:08:36 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:08:36 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:08:36 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:08:36 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:14:19 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:14:19 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:14:19 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:14:19 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:20:54 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:20:54 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:20:54 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:20:54 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:27:47 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:27:47 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:27:47 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:27:47 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:28:54 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:28:54 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:28:54 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:28:54 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:40:17 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:40:17 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:40:18 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:40:18 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 14:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 14:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 15:04:12 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:04:12 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:04:13 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:04:13 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:09:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:09:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:09:34 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:09:34 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:17:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:17:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:17:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:17:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:20:05 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:20:05 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:20:05 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:20:05 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:21:10 15 พฤษภาคม 2561 :There was no endpoint listening at https://rdws.rd.go.th/serviceRD3/vatserviceRD3.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. 15:29:14 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:29:14 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:29:14 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:29:14 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:33:38 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:33:38 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:33:38 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:33:38 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:43:19 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:43:19 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:43:19 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:43:19 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:45:05 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:45:05 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:45:05 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:45:05 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:48:05 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:48:05 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:48:06 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:48:06 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:48:51 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:48:51 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:48:51 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:48:51 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:50:53 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:50:53 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:50:53 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:50:53 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 15:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 16:00:00 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:00:00 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:00:00 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:00:00 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:01:16 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:01:16 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:01:16 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:01:16 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:04:19 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:04:19 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:04:19 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:04:19 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:09:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:09:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:09:29 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:09:29 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:11:41 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:11:41 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:11:41 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:11:41 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:16:05 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:16:05 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:16:06 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:16:06 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:18:46 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:18:46 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:18:47 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:18:47 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:29:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:29:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:29:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:29:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:33:34 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:33:34 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:33:34 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:33:34 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:37:07 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:37:07 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:37:10 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:37:10 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:37:21 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:37:21 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:37:21 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:37:21 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:41:05 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:41:05 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:41:05 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:41:05 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:44:26 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:44:26 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:44:26 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:44:26 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:45:21 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:45:21 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:45:21 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:45:21 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:46:53 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:46:53 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:46:53 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:46:53 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:48:44 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:48:44 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:48:45 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:48:45 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:51:14 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:51:14 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:51:14 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:51:14 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:54:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:54:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:54:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:54:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:56:20 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:56:20 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:56:20 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:56:20 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:58:43 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:58:43 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:58:43 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:58:43 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 16:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 16:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 17:04:39 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:04:39 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:04:40 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:04:40 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:04:48 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:04:48 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:04:49 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:04:49 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:09:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:09:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:09:33 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:09:33 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:52:34 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:52:34 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:52:34 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:52:34 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:54:59 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:54:59 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:55:00 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:55:00 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:59:56 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:59:56 15 พฤษภาคม 2561 :try to logon with: GS1WS 17:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 17:59:56 15 พฤษภาคม 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:59:56 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 19:00:09 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:00:09 15 พฤษภาคม 2561 :try to logon with: GS1WS 19:00:09 15 พฤษภาคม 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:09 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 19:00:09 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:00:09 15 พฤษภาคม 2561 :try to logon with: GS1WS 19:00:09 15 พฤษภาคม 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:09 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 19:59:58 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:59:58 15 พฤษภาคม 2561 :try to logon with: GS1WS 19:59:58 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:59:58 15 พฤษภาคม 2561 :try to logon with: GS1WS 19:59:58 15 พฤษภาคม 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:59:58 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 19:59:58 15 พฤษภาคม 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:59:58 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 20:46:14 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 20:46:14 15 พฤษภาคม 2561 :try to logon with: GS1WS 20:46:14 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 20:46:14 15 พฤษภาคม 2561 :try to logon with: GS1WS 21:00:00 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 21:00:00 15 พฤษภาคม 2561 :try to logon with: GS1WS 21:00:00 15 พฤษภาคม 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:00 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 21:00:00 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 21:00:00 15 พฤษภาคม 2561 :try to logon with: GS1WS 21:00:00 15 พฤษภาคม 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:00 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 22:00:04 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:00:04 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:00:04 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:00:04 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:00:04 15 พฤษภาคม 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:04 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 22:00:04 15 พฤษภาคม 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:04 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 22:25:45 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:25:45 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:25:45 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:25:45 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:30:27 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:30:27 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:30:27 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:30:27 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:34:54 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:34:54 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:34:54 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:34:54 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:36:36 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:36:36 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:36:36 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:36:36 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:46:38 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:46:38 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:46:38 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:46:38 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:47:27 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:47:27 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:47:27 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:47:27 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:48:47 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:48:47 15 พฤษภาคม 2561 :try to logon with: GS1WS 22:48:48 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:48:48 15 พฤษภาคม 2561 :try to logon with: GS1WS 23:00:01 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:00:01 15 พฤษภาคม 2561 :try to logon with: GS1WS 23:00:01 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:00:01 15 พฤษภาคม 2561 :try to logon with: GS1WS 23:00:01 15 พฤษภาคม 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:01 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 23:00:01 15 พฤษภาคม 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:01 15 พฤษภาคม 2561 :There is already an object named 'tempWsGs1_001' in the database. 23:00:13 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:00:13 15 พฤษภาคม 2561 :try to logon with: GS1WS 23:00:13 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:00:13 15 พฤษภาคม 2561 :try to logon with: GS1WS 23:10:04 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:10:04 15 พฤษภาคม 2561 :try to logon with: GS1WS 23:10:05 15 พฤษภาคม 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:10:05 15 พฤษภาคม 2561 :try to logon with: GS1WS