Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Location
    Waco, KY
    Posts
    18

    Unanswered: Quotes on select in Solaris

    UDB, 8.2, Solaris.

    From class, I know that you sometimes need to put single quotes around select statements on the command line. I am trying to do a simple select with a where clause (that has to have single quotes) and it's not working.

    I've tried:
    db2 select a,b,c from syscat.dbauth where grantee = 'public'
    db2 'select a,b,c from syscat.dbauth where grantee = 'public''
    db2 "select a,b,c from syscat.dbauth where grantee = 'public'"

    no luck.
    Julie

  2. #2
    Join Date
    Mar 2004
    Posts
    46
    Your last format is correct, however it does not give the required result because -
    1) SYSCAT.DBAUTH does not have columns a, b or c
    2) DB2 converts all users/groups to upper case, so you should compare to 'PUBLIC'

    Here's a sample query -

    db2 "select * from syscat.dbauth where grantee = 'PUBLIC' "

  3. #3
    Join Date
    May 2006
    Location
    Waco, KY
    Posts
    18
    thanks. that worked. I had tried the PUBLIC but maybe not with that syntax. Thought I did. Sorry for your trouble, but thanks!

    Julie

Posting Permissions

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