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