Re: [OT] Oracle Question



osvif@xxxxxxxxxxx wrote:

> Any Oracle specialists lurking?
>
> I have a table (TABLE1) which has 3 columns of data all type VARCHAR2.
> A second table (TABLE2) containing metadata about the stuff in TABLE1.
> Finally a stored procedure that takes TABLE1 data after being
> converted to the right type using information from TABLE2.
>
> Any smart ideas on getting the type conversion and call to the stored
> procedure using either PL/SQL or Pro*C? The prototype I have been
> asked to look at has a horrible load of IF type = 'FLOAT' THEN .....
> which just looks wrong.

Which version of Oracle? CASE or DECODE would do it, but it sounds like
a terrible design. If you've got control over the structure, it'd be
worth saying what the business requirement is. There may be a better
way of doing it.


--
Krusty.

http://www.muddystuff.co.uk
http://www.muddystuff.us
Off-road classifieds

'02 MV Senna '96 Tiger '79 Fantic 250
.



Relevant Pages

  • Re: How to increment record id in an insert stored procedure
    ... I need to insert records from table2 to table1. ... I wrote the following stored procedure to insert records. ... > Commit Transaction ...
    (microsoft.public.sqlserver.programming)
  • Stored Procedure question
    ... Within a stored procedure I am doing the follwing... ... insert into table1 select aa from #temp ... insert into table2 select aa from table1 ...
    (microsoft.public.sqlserver.programming)
  • How to increment record id in an insert stored procedure
    ... I need to insert records from table2 to table1. ... This stored procedure will insert the ten records from table2 into table1. ... Commit Transaction ...
    (microsoft.public.sqlserver.programming)
  • Re: Tricky Visual Basic Code help...
    ... moves the current record into a new record in table2. ... this with a little VBA code and a couple custom queries. ... Set a "pushFlag" column in the record in table1 to a specific ... If a duplicate is not found, ...
    (microsoft.public.access.formscoding)
  • Re: Help needed with importing XML
    ... You could add a gratuitous identity column to #temp and use ... Those examples showed how to decompose arbitrary XML in multiple ... table1 and table2. ... But there has to be something in the relational schema tying table1 ...
    (microsoft.public.sqlserver.xml)