0:00:50 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 0:00:50 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 1:00:50 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 1:00:50 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 2:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 2:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 3:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 3:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 4:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 4:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 5:00:50 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 5:00:50 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 6:00:50 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 6:00:50 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 7:00:51 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 7:00:51 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 8:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 8:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 8:54:41 14 กุมภาพันธ์ 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 9:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 9:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 9:08:52 14 กุมภาพันธ์ 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 10:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 10:00:54 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:00:54 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 10:00:54 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:00:54 14 กุมภาพันธ์ 2561 :There is already an object named 'tempWsGs1_001' in the database. 10:09:55 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:09:55 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 10:42:56 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:42:56 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 10:44:14 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 10:44:14 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 11:00:53 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:00:53 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 11:00:53 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 11:00:53 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 11:00:53 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:00:53 14 กุมภาพันธ์ 2561 :There is already an object named 'tempWsGs1_001' in the database. 11:20:48 14 กุมภาพันธ์ 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 12:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 12:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 12:00:50 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:00:50 14 กุมภาพันธ์ 2561 :There is already an object named 'tempWsGs1_001' in the database. 12:06:40 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:06:40 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 12:08:43 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:08:43 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 12:16:10 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:16:10 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 12:20:21 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:20:21 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 12:20:50 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:20:50 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:21:02 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:21:02 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:21:19 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:21:19 14 กุมภาพันธ์ 2561 :try to logon with: demo 12:21:33 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:21:33 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:21:36 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:21:36 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:24:01 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:24:01 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:24:30 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:24:30 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:24:48 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:24:48 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:25:21 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:25:21 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:25:58 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:25:58 14 กุมภาพันธ์ 2561 :try to logon with: SvcApp 12:26:08 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:26:08 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:26:17 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:26:17 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:26:26 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:26:26 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:27:09 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:27:09 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 12:32:42 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 12:32:42 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 12:36:46 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 12:36:46 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 13:00:52 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:00:52 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 13:08:21 14 กุมภาพันธ์ 2561 :The user name or password is incorrect. 13:08:21 14 กุมภาพันธ์ 2561 :try to logon with: svcApp 13:17:08 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:17:08 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 13:30:28 14 กุมภาพันธ์ 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 13:36:57 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:39:20 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:39:20 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 13:39:41 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:39:41 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 13:41:06 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 13:41:06 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 13:46:59 14 กุมภาพันธ์ 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 14:00:50 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:00:50 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 14:00:57 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:00:57 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 14:00: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 14:00:57 14 กุมภาพันธ์ 2561 :There is already an object named 'tempWsGs1_001' in the database. 14:08:41 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:08:41 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 14:33:24 14 กุมภาพันธ์ 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 14:39:01 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:39:01 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 14:41:46 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:41:46 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 14:42:33 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:42:33 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 14:43:34 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 14:43:34 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 15:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 15:00:50 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:00:50 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 15:00:50 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:00:50 14 กุมภาพันธ์ 2561 :There is already an object named 'tempWsGs1_001' in the database. 15:43:30 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:43:30 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 15:49:07 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 15:49:07 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 16:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 16:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 16:00:49 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:00:49 14 กุมภาพันธ์ 2561 :There is already an object named 'tempWsGs1_001' in the database. 16:08:29 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:08:29 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 16:37:21 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 16:37:21 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 16:59:35 14 กุมภาพันธ์ 2561 :Server was unable to process request. ---> Cannot open database "RDtmp" requested by the login. The login failed. 17:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 17:15:16 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:15:16 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 17:16:03 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:16:03 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 17:16:25 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:16:25 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 17:18:12 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:18:12 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 17:20:02 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:20:02 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 17:20:26 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:20:26 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 17:43:19 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:43:19 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 17:49:33 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 17:49:33 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 18:03:05 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:03:05 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 18:03:05 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 18:03:05 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 18:03:05 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 18:03:05 14 กุมภาพันธ์ 2561 :There is already an object named 'tempWsGs1_001' in the database. 19:00:51 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 19:00:51 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 20:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 20:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 20:13:34 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 20:13:34 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 20:16:54 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 20:16:54 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 21:00:49 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 21:00:49 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 22:00:51 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 22:00:51 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS 23:00:57 14 กุมภาพันธ์ 2561 :Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 23:00:57 14 กุมภาพันธ์ 2561 :try to logon with: GS1WS