need help creating a derived column based on the output of the previous column

need help creating a derived column based on the output of the previous column

 

  

Hello again folks! It's me again, automating reports against a Oracle DB
trying to use MS SQL tools. UGH!



In it s simplest form, here is what I need to do. I am doing a shipping
log report which pulls a server's model number. There are 22 potential
model numbers that come up for this customer. This customer has their
own asset tag numbers provided by them on excel spreadsheet that
coincide with our 22 part numbers. Currently our customer service is
hand writing these in on this report. So what I what to do to automate
this is create the next column called "Asset tag" based on the value of
the Model number. I will provide a model number and asset tag for the
example.



Select model AS "Model Number"

from ship_tbl



This may return: FG-IMP-MX-123 If it does, then I need the next derived
column, called 'Asset tag', to display Impva-MXFTL. I will have to hard
code all 22 of our part numbers to match the customers asset tags in
this query as this customers asset tags are not in the database.



The only gotcha is I am using an Oracle provider for my data connection
so syntax is not always the same as MS SQL. (i.e. 'SUBSTRING' in MS SQL
is 'SUBSTR' using the MS ODBC for Oracle system DSN to an Oracle DB)





Any help is greatly appreciated and will be rewarded handsomely. (with
a big pat on the back. heh)





Noel Warnert

Patriot Technologies

IT Manager


31/8/2007The information transmitted in this communication is intended only
for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient is
prohibited. If you received this in error, please destroy any copies,
contact the sender and delete the material from any computer.



MS Sql Server LazyDBA home page