convert access query in Oracle... Please Help!

  • What is the best way to this in Oracle? I can't find a way to use the alias in oracle like I made here in access

    SELECT PD_1759B_PDTABLE_134.SECONDARY_DESCRIPT AS S, InStr(,Chr(34)) AS pos, InStr([pos],,"-") AS 0M, InStr([0M]+1,,"-") AS 1M, InStr([1M]+1,,"-") AS 2M, InStr([2M]+1,,"-") AS 3M, Mid(,[0m]+1,[3m]-1-[0m]) AS Expr1

    FROM PD_1759B_PDTABLE_134

    WHERE (((PD_1759B_PDTABLE_134.SECONDARY_DESCRIPT) Like "*"+Chr(34)+"*"));

    also Someone know how to made a userfunction that I can use in the SQL to made something like:

    select usrid, name, sex, Join('select telephones from tel where usrid =' & usrid;";") from users;

    I mean in each item I'll get :

    001 | Andre | male | 3277-0987; 3443-0000 |

    thanks a lot;

  • I think this isnt the ideal forum to ask a question like that. you should be better off with dbforums.com .

  • I am a bit confused here. Can you walk thru your query. It looks like you try to reference a new item in the same select S is defined as the first column then S is used by 1M, 1M by 2M, etc. You cannot do this as the query does not understand each. You can however build a multiplevel subquery to handle or tell us your logic and maybe we can offer a better solution.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply