Topic: SQL*Plus and PL/SQL >> To solve this query
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Title: To solve this query |
| vikas |
Posted: Jan 05, 2007 05:12:58 AM |
Total Post: 10
Joined: Oct, 2006
|
i want solution for shape & append query as run in access for oracle
RS.Open "SHAPE {select ID,MAX(Module_Name) AS MainMenu from USER_MODULE GROUP BY ID} APPEND ({select ID,NAME,USER_module.srno,iif(right(param_str,1)='P','ü','') as Allow,iif(left(param_str,1)='A','ü','') as Ins,iif(MID(param_str,2,1)='E','ü','') as Edit,iif(MID(param_str,3,1) = 'D','ü','') as Del,flag,CODE,NAME from USER_MODULE left join user1 on user1.srno=USER_module.srno where user_name='" & Master_Rst!USER_NAME & "' or user_name is null} RELATE ID TO ID) AS AA", G_CompCn, adOpenDynamic, adLockOptimistic
|
|
|
Vigyan |
| Posted: Jan 05, 2007 07:17:03 AM | |
|
Total Post: 386
Joined: May, 2001
|
Hi Vikas,
You can use "Connect By" for SHAPE in Oracle. For append you can probably use "Union" in Oracle but check before using it and see if you are getting same result set.
You should read document for connect by for syntax.
Hope it helps.
Vigyan
|
|
|
|
|
vikas |
| Posted: Jan 09, 2007 04:55:08 AM | |
|
Total Post: 10
Joined: Oct, 2006
|
thanks for solution but it not work. some one tell me the following solution but the oracle produce error:
with MAX_USERMODULE as (
select ID, MAX(Module_Name) AS MainMenu
from USER_MODULE GROUP BY ID)
select ID, NAME, USER_module.srno,
decode(substr(param_str,4,1), 'P','ü','') as Allow,
decode(substr(param_str,1,1), 'A','ü','') as Ins,
decode(substr(param_str,2,1), 'E','ü','') as Edit,
decode(substr(param_str,3,1), 'D','ü','') as Del,
flag,CODE,NAME
from USER_MODULE, user1
where ( user_name='" & Master_Rst!USER_NAME & "'
or user_name is null)
and user1.srno=USER_module.srno
and USER_MODULE.ID=MAX_USERMODULE.ID
ORA-32035: unreferenced query name defined in WITH clause
Suggest me plz.
thanks
Regards
Vikas
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 857 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Gopu Gopi | 334 |
| Gitesh Trivedi | 322 |
| Vinoth Kumar | 264 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|