Just sharing final code in C
#define SQL_TEXT Latin_Text
#include "sqltypes_td.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void removechar(VARCHAR_LATIN *inputString, VARCHAR_LATIN *result, char sqlstate[6])
{
int n, i , j;
char *target_ptr;
target_ptr = result;
n = strlen((char *) inputString);
*result = '\0';
for( i = 0; i < n; i++)
{
if( inputString[i] >= 0x30 && inputString[i] <= 0x39 )
{
*(target_ptr++) = inputString[i];
}
}
*target_ptr = '\0';
}
↧