Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Contains clause in query giving trouble

  • 11-03-2014 5:34pm
    #1
    Registered Users, Registered Users 2 Posts: 5,659 ✭✭✭


    Im running the following query to use the CONTAINS clause in my database table.
    printf "Use ourdb_1_1\ngo\nSelect count(*) from persons_list where Rec_count=0 AND text LIKE '%Profile id%'\ngo\nexit" | isql -Usa -Psybase11
    
    bash: printf: `P': invalid format character
    
    

    I cant understand why it gives the error (doesnt like the P in Profile id). Maybe this is something obvious but im stumped :mad:


Comments

  • Technology & Internet Moderators Posts: 28,830 Mod ✭✭✭✭oscarBravo


    The printf command is interpreting the %P as a format character. You need to "escape" the percentage signs by doubling them up: "... LIKE '%%Profile id%%'\ngo..."


Advertisement