리코딩 스크립트포스트 쿼리 scipt를 사용하여 SQL 서버에서 데이터를 가져온 후 데이터(0에서 .)를 다시 코딩하려고 합니다. 스크립트 끝에 오류가 발생합니다. 데이터 테이블 자체에서 스크립트를 실행할 수 있지만 데이터를 입력할 때 이 작업이 자동으로 수행되기를 원합니다.
여기 내 스크립트가 있습니다.
테이블에 속성 추가(
{새 스크립트(
"레코딩" ,
현재 데이터 테이블 () << 데이터 업데이트 시작 ;
각 행에 대해 ( :purity_2 = 성냥 ( :purity_2, 0 , . , . , . , :purity_2 ) );
각 행에 대해 ( :purity_3 = 성냥 ( :purity_3, 0 , . , . , . , :purity_3 ) );
각 행에 대해 ( :purity_4 = 성냥 ( :purity_4, 0 , . , . , . , :purity_4 ) );
각 행에 대해 ( :plus50_2 = 성냥 ( :plus50_2, 0 , . , . , . , :plus50_2 ) );
각 행에 대해 ( :plus100_2 = 성냥 ( :plus100_2, 0 , . , . , . , :plus100_2 ) );
각 행에 대해 ( :plus140_2 = 성냥 ( :plus140_2, 0 , . , . , . , :plus140_2 ) );
현재 데이터 테이블 () << 데이터 업데이트 종료
}
오류 메시지는 다음과 같습니다.
예기치 않은 입력 종료. 누락된 "," 또는 ")"가 있을 수 있습니다.
"테이블에 속성 추가" 함수의 인수를 구문 분석하려고 합니다.
60행 45열: 현재 데이터 테이블() << 데이터 업데이트 종료;)}►
감사해요,
Re: 스크립트 재코딩편집: 이것을 무시하십시오. 위의 Jim의 게시물과 동일합니다.
새 스크립트 메시지를 테이블에 직접 보낼 수도 있습니다.
dt << New Script(
"Recode 2",
Current Data Table() << Begin Data Update;
For Each Row( :purity_2 = Match( :purity_2, 0, ., ., ., :purity_2 ) );
For Each Row( :purity_3 = Match( :purity_3, 0, ., ., ., :purity_3 ) );
For Each Row( :purity_4 = Match( :purity_4, 0, ., ., ., :purity_4 ) );
For Each Row( :plus50_2 = Match( :plus50_2, 0, ., ., ., :plus50_2 ) );
For Each Row( :plus100_2 = Match( :plus100_2, 0, ., ., ., :plus100_2 ) );
For Each Row( :plus140_2 = Match( :plus140_2, 0, ., ., ., :plus140_2 ) );
Current Data Table() << End Data Update;
);
Re: 스크립트 재코딩이것을 데이터 테이블에 메시지로 보내야 합니다.이를 수행하는 한 가지 방법은 다음과 같습니다.
dt = current data table();
dt << Add Properties to Table(
{New Script(
"Recode",
Current Data Table() << Begin Data Update;
For Each Row( :purity_2 = Match( :purity_2, 0, ., ., ., :purity_2 ) );
For Each Row( :purity_3 = Match( :purity_3, 0, ., ., ., :purity_3 ) );
For Each Row( :purity_4 = Match( :purity_4, 0, ., ., ., :purity_4 ) );
For Each Row( :plus50_2 = Match( :plus50_2, 0, ., ., ., :plus50_2 ) );
For Each Row( :plus100_2 = Match( :plus100_2, 0, ., ., ., :plus100_2 ) );
For Each Row( :plus140_2 = Match( :plus140_2, 0, ., ., ., :plus140_2 ) );
Current Data Table() << End Data Update;
)});
Re: 스크립트 재코딩저는 "테이블()에 속성 추가"를 사용한 경험이 없지만 스크립팅 인덱스에서 정의를 읽을 때 수행하려는 작업이 작동하지 않는 것 같습니다.다음과 같은 스크립트 단순화가 작동합니다.
Names Default to Here( 1 );
Current Data Table() << New Script(
"Recode",
Current Data Table() << Begin Data Update;
For Each Row( :purity_2 = Match( :purity_2, 0, ., ., ., :purity_2 ) );
For Each Row( :purity_3 = Match( :purity_3, 0, ., ., ., :purity_3 ) );
For Each Row( :purity_4 = Match( :purity_4, 0, ., ., ., :purity_4 ) );
For Each Row( :plus50_2 = Match( :plus50_2, 0, ., ., ., :plus50_2 ) );
For Each Row( :plus100_2 = Match( :plus100_2, 0, ., ., ., :plus100_2 ) );
For Each Row( :plus140_2 = Match( :plus140_2, 0, ., ., ., :plus140_2 ) );
Current Data Table() << End Data Update;
);
Re: 스크립트 재코딩작동하지 않아 다음 메시지가 표시되었습니다.
테이블에 속성 추가(
{새 스크립트(
"레코딩",
현재 데이터 테이블() << 데이터 업데이트 시작;
각 행에 대해( :purity_2 = Match( :purity_2, 0, ., ., ., :purity_2 ) );
각 행에 대해( :purity_3 = Match( :purity_3, 0, ., ., ., :purity_3 ) );
각 행에 대해( :purity_4 = Match( :purity_4, 0, ., ., ., :purity_4 ) );
각 행에 대해( :plus50_2 = 일치( :plus50_2, 0, ., ., ., :plus50_2 ) );
각 행에 대해( :plus100_2 = 일치( :plus100_2, 0, ., ., ., :plus100_2 ) );
각 행에 대해( :plus140_2 = 일치( :plus140_2, 0, ., ., ., :plus140_2 ) );
현재 데이터 테이블() << 데이터 업데이트 종료;
)}
) /*###*/;
Re: 스크립트 재코딩끝에 닫는 괄호가 없습니다.
Current Data Table() << End Data Update;)}<STRONG>);</STRONG>