kodemonki
2009-03-27 18:10:45 UTC
Apparently you can't use
<cfquery name="client_files" dbtype="query">
SELECT name
FROM dealer
WHERE left(name, 3) = 'BP_'
</cfquery>
you have to use
<cfquery name="client_files" dbtype="query">
SELECT name
FROM dealer
WHERE name like 'BP_%'
</cfquery>
what SQL syntax is CF using? I use Oracle, so I'm having difficulty figuring
out how to do what I need. Now that I've found how to get the first three
characters to match, I need to find the max of the last 14 characters
(timestampe) to get the most recent one. Something tells me I can't use
something like max(substr(name,length(name)-10,10)) inside the query.
Any ideas?
Thanks!
<cfquery name="client_files" dbtype="query">
SELECT name
FROM dealer
WHERE left(name, 3) = 'BP_'
</cfquery>
you have to use
<cfquery name="client_files" dbtype="query">
SELECT name
FROM dealer
WHERE name like 'BP_%'
</cfquery>
what SQL syntax is CF using? I use Oracle, so I'm having difficulty figuring
out how to do what I need. Now that I've found how to get the first three
characters to match, I need to find the max of the last 14 characters
(timestampe) to get the most recent one. Something tells me I can't use
something like max(substr(name,length(name)-10,10)) inside the query.
Any ideas?
Thanks!