Unix/Linux Go Back    

Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Best match query


Thread Tools Search this Thread Display Modes
Old Unix and Linux 11-10-2016   -   Original Discussion by yahyaaa
jameswarner's Unix or Linux Image
jameswarner jameswarner is offline
Registered User
Join Date: Nov 2016
Last Activity: 10 November 2016, 4:31 AM EST
Location: United States
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Here one of simple match query example

select 1
  from (
        select Q1
          from T1
         where C1 <= 'fxg87698x84'
         order by Q1 desc
         limit 1
       ) tmp
 where 'fxg87698x84' like concat (Q1, '%')

Moderator's Comments:
Best match query Please use CODE tags as required by forum rules!

Last edited by RudiC; 11-10-2016 at 05:51 AM.. Reason: Added CODE tags.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Request: How to Parse dynamic SQL query to pad extra columns to match the fixed number of columns vikas_trl Shell Programming and Scripting 7 01-22-2015 04:18 PM
Shell Script to execute Oracle query taking input from a file to form query DevendraG Shell Programming and Scripting 2 11-10-2011 06:56 AM
sql query to match condition from other table (time sensitive) computethis Programming 2 08-10-2011 02:35 AM
Query Oracle tables and return values to shell script that calls the query balaeswari Shell Programming and Scripting 6 02-04-2010 09:35 AM
mysql query all entries which 'dont' match hazno UNIX and Linux Applications 1 04-08-2009 12:47 AM

All times are GMT -4. The time now is 01:07 PM.