How to get project name by pkey-integer? (sql command)

Alok Band May 9, 2012

If I have a pkey-intger (for e.g. bug-20) how do I find associated project name? Can someone please help?

I believe "project" table does have an entry for pkey and with associated pname, I need to get rid of integer value

1 answer

2 votes
Azwandi Mohd Aris
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 9, 2012

I assume pkey is the project key? If that is the case, you can query from the project table.

select * from project where pkey = '<PKEY_HERE>';

Use the database susbtring function to extract the pkey from pkey-integer e.g. for MySQL - http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_substring-index

Alok Band May 9, 2012

Hi Azwandi,

Thanks for your response, I will give it a try.

Suggest an answer

Log in or Sign up to answer