<commit_before># ARSSQLR - SQL-Tools

Example reading a table.

	dcl-s pInResultSet int(10) const;
	dcl-s pAnA varchar(20);
	dcl-s pBoIndA ind;
	dcl-s pNuB packed(10:5);
	dcl-s pBoIndB ind;
	dcl-s pBoErrB ind;
	
	inResultSet = SqlStatement('Select a, b from table1');
	dow SqlRsNext(inResultSet);
	  
		pAnA = SqlRsGetString(inResultSet:1:pBoIndA);
		pNuB = SqlRsGetDecimal(inResultSet:2); 
		pBoIndB = SqlRsSetWasNull(inResultSet); // pNuB is NULL
		pBoErrB = SqlRsSetHasErrors(inResultSet); // data mapping error ?
	  
	enddo;
	SqlRsClose(pinResultSet);
	
Example reading a table twice.

	dcl-s pInPreparedSt int(10) const;
	dcl-s pInResultSet int(10) const;
	dcl-s pInAIdx int(10);
	dcl-s pAnA varchar(20);
	dcl-s pInBIdx int(10);
	dcl-s pNuB packed(10:5);
	
	pInPreparedSt = SqlPreparedStatement('Select b, a from table1');
		
	inResultSet = SqlPreparedStatementExecuteQuery(pInPreparedSt);<commit_msg>beta SQL functions<commit_after># ARSSQLR - SQL-Tools

Example reading a table. 

	dcl-s pInResultSet int(10) const;
	dcl-s pAnA varchar(20);
	dcl-s pBoIndA ind;
	dcl-s pNuB packed(10:5);
	dcl-s pBoIndB ind;
	dcl-s pBoErrB ind;
	
	inResultSet = SqlStatement('Select a, b from table1');
	dow SqlRsNext(inResultSet);
	  
		pAnA = SqlRsGetString(inResultSet:1:pBoIndA);
		pNuB = SqlRsGetDecimal(inResultSet:2); 
		pBoIndB = SqlRsSetWasNull(inResultSet); // pNuB is NULL
		pBoErrB = SqlRsSetHasErrors(inResultSet); // data mapping error ?
	  
	enddo;
	SqlRsClose(pinResultSet);
	
Example reading a table twice.

	dcl-s pInPreparedSt int(10) const;
	dcl-s pInResultSet int(10) const;
	dcl-s pInAIdx int(10);
	dcl-s pAnA varchar(20);
	dcl-s pInBIdx int(10);
	dcl-s pNuB packed(10:5);
	
	pInPreparedSt = SqlPreparedStatement('Select b, a from table1');
		
	inResultSet = SqlPreparedStatementExecuteQuery(pInPreparedSt);
{'fraction_non_alphanumeric': 0.1111111111111111, 'fraction_numerical': 0.026402640264026403, 'mean_word_length': 4.614197530864198, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7333949', 'n_tokens_mistral': 824, 'n_tokens_neox': 750, 'n_words': 167}