February 14th, 2004, 01:39 PM
can someone help me with this ,,,,,
I have a table customer with the following fields
customerID is of the form Cxxxx, xxxx is numbers 0001-9999
custCat is string of three letters which specifies the type of customer..like spl(special), ord(ordinary) etc...
I would like to know if there is any way, I can get a combination of customerID and custCat as customerId when user makes a 'SELECT query.
I mean when user selects some records, he should see customerID as splC0001 or 'ordC8398' etc...even though customerID on database is Cxxxx....s
Please suggest any other solutions for this situation
February 14th, 2004, 03:37 PM
February 14th, 2004, 07:38 PM
U didn't understand my question.
I want to set up on database side such that whenever user queries as
select customerID etc...
it should fetch me
select custCat||customerID etc..
I hope now it is clear...sorry for confusion
February 15th, 2004, 03:21 AM
CREATE VIEW user_view
SELECT custCat||customerID, ...
Then give the user only access to the view
February 15th, 2004, 09:14 AM
I do not have just one query and more over I lready have an application that is using the select cust||custCat etc type queries...which I do not want to change..so im tryin other solutions...
please let me know if I am not clear.