Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Verisign Code Signing
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 14th, 2004, 01:39 PM
ben7703 ben7703 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 ben7703 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post Oracle SQL

Hi
can someone help me with this ,,,,,

I have a table customer with the following fields

customerID
custCat
etc,,

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
thanks,

Reply With Quote
  #2  
Old February 14th, 2004, 03:37 PM
shammat shammat is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2003
Location: Munich, Bavaria
Posts: 933 shammat User rank is Sergeant Major (2000 - 5000 Reputation Level)shammat User rank is Sergeant Major (2000 - 5000 Reputation Level)shammat User rank is Sergeant Major (2000 - 5000 Reputation Level)shammat User rank is Sergeant Major (2000 - 5000 Reputation Level)shammat User rank is Sergeant Major (2000 - 5000 Reputation Level)shammat User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 5 h 48 m 33 sec
Reputation Power: 54
SELECT custCat||customerID
FROM ...

Reply With Quote
  #3  
Old February 14th, 2004, 07:38 PM
ben7703 ben7703 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 ben7703 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old February 15th, 2004, 03:21 AM
shammat shammat is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2003
Location: Munich, Bavaria
Posts: 933 shammat User rank is Sergeant Major (2000 - 5000 Reputation Level)shammat User rank is Sergeant Major (2000 - 5000 Reputation Level)shammat User rank is Sergeant Major (2000 - 5000 Reputation Level)shammat User rank is Sergeant Major (2000 - 5000 Reputation Level)shammat User rank is Sergeant Major (2000 - 5000 Reputation Level)shammat User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 5 h 48 m 33 sec
Reputation Power: 54
CREATE VIEW user_view
AS
SELECT custCat||customerID, ...
FROM ...

Then give the user only access to the view

Reply With Quote
  #5  
Old February 15th, 2004, 09:14 AM
ben7703 ben7703 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 ben7703 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Oracle SQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

VeriSign Code Signing




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway