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