Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2014
    Posts
    2

    Unanswered: How to specify index in the DB query for the string in a column

    In my database I have a column which contain location of a file. The column contains entries like -

    Code:
    scripts/testSuite/sdnSTC/Flare/Backup_Restore/Sprint16_tests/BackupHugeDatabase.tcl
    
        scripts/testSuite/sdnSTC/Flare/Backup_Restore/Standalone_backup/Backup_Restore_BackupRestoreApplications.tcl
    
    
    scripts/testSuite/networkSecurity/802dot1x/802dot1xConfiguration/802dot1xBasicUserMode.tcl
    
                scripts/testSuite/hostAgentFeatures/debugLogging/debugLoggingFeatureTesting/DebugLoggingIPv6Forwarding.tcl
    I want to query this database and check for the values like networkSecurity, hostAgentFeatures etc at the specified index 2.

    I tried using REGEXP and LIKE but it does not always returns the correct output.

    Is there a way to specify index in MySQL ?

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    consider using a fulltext index and use the MATCH predicate
    OR
    use
    where mycolumn like '%networkSecurity%'
    I'd rather be riding on the Tiger 800 or the Norton

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •