×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
FWiW whether a space is after a delimited literal, prior to a new
clause of the SELECT, is of no concern to the SQL.
However that there is no column named DESC and no column named
TEEMES, both of those would be a problem :-) Given the spurious comma
is eliminated and the column reference TEEMES is changed to TEMEES [as
shown in the /original SQL/ which presumably was functional], the SQL
will work either way; with or without the extra space. That is because
the space is just whitespace to the SQL.
Specifically either of the following works fine without error; albeit
the latter is probably considered more readable by most:
and TEMEES = 'FR'ORDER BY AGE DESC'
and TEMEES = 'FR' ORDER BY AGE DESC'
Regards, Chuck
On 07 Mar 2013 12:42, DeLong, Eric wrote:
Add a space....
/space before your order by clause...
'WHERE TEMEMP = TE1EMP and ' + STS + ' ORDER BY AGE,DESC';
Smith, Mike on Thursday, March 07, 2013 2:23 PM wrote:
<<SNIP>>
This is the original SQL statement.
<<SNIP>> WHERE TEMEMP = TE1EMP and TEMEES = 'FR' Order by age desc;
<<SNIP>> Here is where I'm at now.
Select ;
When FPEMP = 'F' ;
Sts = 'TEEMES = ' + Q + 'FR' + Q;
When FPEMP = 'P' ;
Sts = 'TEEMES = ' + Q + 'PT' + Q;
EndSl ;
sqlstring =
'select <<SNIP>>
'WHERE TEMEMP = TE1EMP and ' + STS + 'ORDER BY AGE,DESC';
<<SNIP>>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.