OraQuery1.SQL.text := 'select ''1'' from dual'; // Field as string
OraQuery1.Open;
OraQuery1.IndexFieldNames := '''1'' DESC;'; // raise error Field 1 not found
Error for sort with '
Re: Error for sort with '
hello,
In the provided query '1' is not the name but the field value, therefore when attempting to set IndexFieldNames, you get an error.
To use IndexFieldNames with such queries, you should use alias, i.e.:
P.S. In Oracle fields can start with a letter only
In the provided query '1' is not the name but the field value, therefore when attempting to set IndexFieldNames, you get an error.
To use IndexFieldNames with such queries, you should use alias, i.e.:
Code: Select all
OraQuery1.SQL.text := 'select ''1'' as MyField from dual';
OraQuery1.Open;
OraQuery1.IndexFieldNames := 'MyField DESC;'; Re: Error for sort with '
Can I get around it somehow indicating the serial number for sorting for example? (like sql "order by 1", but for local sorting)
Re: Error for sort with '
hello,
At the moment, you cannot use field numbers in local sorting, we will review the possibility to add this feature in one of the next versions
At the moment, you cannot use field numbers in local sorting, we will review the possibility to add this feature in one of the next versions