Malformed SQL Join Created in BO XI SP5
Hi I am receiving the following message when running a specific universe-based Crystal Report:
Error in File C:\Program Files\Business Objects\BusinessObjects Enterprise 11.5\Data\procSched\hq-erpboprod.reportjobserver\~tmp1e061e138ef0560.rpt: Failed to retrieve data from the database.
I can see why it is failing to retrieve data from the database - the SQL that the Crystal is generating is not putting the 'AND' in between each clause in the join statement (see below). However, when I build the same query in Designer, I get the correct SQL results.
SELECT GLPD.GLDGL, GLPGL.GLGLNM, cvtdate(GLPD.GLDEDT), GLPD.GLDJC, GLPD.GLDEDS, sum(GLPD.GLDBA), GLPD.GLDJB, GLPD.GLDCC, GLPD.GLDCN, GLPPJ.GLPJ, DT_ROLLUPLEV.XAFVVC, trim(GLPPJ.GLPJNM), GLPD.GLDBT, GLPD.GLDBE, GLPD.GLDBL FROM GLPD INNER JOIN GLPMF ON (GLPMF.GLMGL= GLPD.GLDGL AND GLPMF.GLMCO=GLPD.GLDCOGLPMF.GLMIC= GLPD.GLDICGLPMF.GLMPJ= GLPD.GLDPJGLPMF.GLMJB= GLPD.GLDJBGLPMF.GLMCC= GLPD.GLDCCGLPMF.GLMCN= GLPD.GLDCNGLPMF.GLMBK=GLPD.GLDBKGLPD.GLDFY=GLPMF.GLMFYGLPD.GLDFFC=GLPMF.GLMFFCGLPMF.GLMFFY=GLPD.GLDFFYGLPD.GLDFC=GLPMF.GLMFC) RIGHT OUTER JOIN GLPGL ON (GLPMF.GLMGL=GLPGL.GLGL) INNER JOIN GLPPJ ON (GLPMF.GLMPJ=GLPPJ.GLPJ) RIGHT OUTER JOIN ( select distinct xafvk1, xafvvc, xafvvd
from xapfv
where xafvfl = 'XAPROJECT'
and xafvff = 'ROLLUPLEV' ) AS DT_ROLLUPLEV ON (GLPPJ.GLPJNV=DT_ROLLUPLEV.XAFVK1) WHERE ( GLPD.GLDBK='ACT' ) AND ( ( ( GLPPJ.GLPJ ) IN {?Query1_Prompt0} ) AND ( ( GLPMF.GLMBK )=('{?Query1_Prompt1}') ) AND GLPGL.GLGL IN {?Query1_Prompt2} AND DT_ROLLUPLEV.XAFVVC IN {?Query1_Prompt3} AND ( GLPD.GLDEDT <= RCVTDATE(( XCVTDATE(DATE(SUBSTRING({?Query1_Prompt4},1,10))) )) AND GLPD.GLDEDT >= RCVTDATE(( XCVTDATE(DATE(SUBSTRING({?Query1_Prompt5},1,10))) )) ) ) GROUP BY GLPD.GLDGL, GLPGL.GLGLNM, cvtdate(GLPD.GLDEDT), GLPD.GLDJC, GLPD.GLDEDS, GLPD.GLDJB, GLPD.GLDCC, GLPD.GLDCN, GLPPJ.GLPJ, DT_ROLLUPLEV.XAFVVC, trim(GLPPJ.GLPJNM), GLPD.GLDBT, GLPD.GLDBE, GLPD.GLDBL
Has anyone seen anything like this?
We have recently migrated from BO XI R2 SP2 to BO XI R2 SP5.
We use SQL Server 2005 SP3.
This should be set up in steps, Have you configured java AD kerberos so you can login via your web/app with AD? This is a prerequisite before setting up any type of delegation to the DB.
You can also set up SSO in the front end but this shouldn't be necessarry for delegating to the DB.
What SPN's do you need...
Well if using java AD you should have an SPN for the account running the SIA (typically BOBJCentralMS/something) This SPN needs to be set in the CMC, You will need the krb5 and bsclogin files to login to your web/app with kerberos/AD. The krb5.ini will have to have a setting forwardable = true, and finally the MSAS server will need SPN's http://support.microsoft.com/kb/917409
This a a very complex configuration and you will likely need to open an incident with support to get an engineer to help. I'm not sure where our current docs for the configuration are.
Regards,
Tim
Similar Messages
-
How to determine via SQL who created the sales order
Hello I am trying to determine via SQL who created the Sales Order. I'm looking at the ADOC table but having a hard time determining which record points to the sales order creation.
Hi Jimmy,
Try this:
select
T0.[DocNum], T2.[DocDate], T2.[CardCode], T2.[CardName],
T1.U_NAME as [User Name], T2.UpdateDate as [Cancelled Date]
from
ORDR T0
inner join OUSR T1 on T0.UserSign = T1.UserID
inner join ADOC T2 on T0.DocNum = T2.DocNum
where
T2.LogInstanc = (select min(LogInstanc) from ADOC T3 where T3.ObjType = 17 and T3.DocNum = T0.DocNum and T3.CANCELED = 'Y')
and T2.CANCELED = 'Y'
and T2.ObjType = 17
group by
T0.DocNum, T2.DocDate, T2.CardCode, T2.CardName, T1.U_NAME, T2.UpdateDate
Kind Regards,
Owen -
SQL JOIN with BPM sql component
Hello friends.
How to use SQL JOIN with BPM sql component?
The tables objects are created but the joined tables belong to different sql components .
I tried something like that, but a error "table doesn't exist" occours.
Ex:
for each element in
SELECT imuImovelCd
FROM IMOVEIS_URBANOS,
Integracao.FGLP.IMOVEIS_PRE_EDITAIS
WHERE IMOVEIS_URBANOS.imuImovelCd = Integracao.FGLP.IMOVEIS_PRE_EDITAIS.ipeImuCd
AND Integracao.FGLP.IMOVEIS_PRE_EDITAIS.ipePedNr = 1
AND Integracao.FGLP.IMOVEIS_PRE_EDITAIS.ipePedAa = 2008
do
extend this.imoveis using cdImovel = element.imuimovelcd,
nrImovel = call(DEC_ENDERECO, codimovel : element.imuimovelcd, tipoimovel : 1)
end
Edited by: user9008295 on 26/01/2010 05:19ok, ok you are right.
When I try use SQL Statement to make a JOIN with 2 tables on different sql objects, BPM returns "table dosn't exists".
So.... I change my code. I dont know if this is the best way to do, but... i hope u, or everyone, can help me to do a best work.
This code works fine.
for each element in
SELECT ipeImuCd
FROM Integracao.FGLP.IMOVEIS_PRE_EDITAIS
WHERE Integracao.FGLP.IMOVEIS_PRE_EDITAIS.ipePedNr = 1
AND Integracao.FGLP.IMOVEIS_PRE_EDITAIS.ipePedAa = 2008
do
for each element2 in
SELECT imuImovelDv
FROM IMOVEIS_URBANOS
WHERE imuImovelCd = element.ipeImuCd
do
extend this.imoveis using cdDvImovel = String(element2.imuImovelDv),
cdImovel = Decimal(element.ipeImuCd),
endereco = call(DEC_ENDERECO, codimovel : element.ipeImuCd, tipoimovel : 1)
end
end
Thx a lot!!! -
Converting oracle join to Ansi sql join
Hi Guys,
I am new to SQL and trying to convert the following Oracle query (joins) into ANSI sql joins...Can someone please help me?
SELECT M.EXTERNALCODE, M.NAME AS MNAME, SC.BIRIM, SM.TRANSACTIONDATE, SMD.AMOUNT,
SMD.UNITPRICE, SM.ID AS SMID, SMD.ID AS SMDID, F.NAME AS FNAME,
IFNULL (SMD.AMOUNT, 0, SMD.AMOUNT) * IFNULL (SMD.UNITPRICE, 0, SMD.UNITPRICE) AS TOTALPRICE, SMD.AMOUNT AS RECEIVED_QUANTITY,
PD.ORDERID, PD.AMOUNT QUANTITY, PO.PROCESSDATE
FROM STOCKMAINTRANSACTION SM,
STOCKMAINTRANSACTIONDETAIL SMD,
MATERIAL M,
STOCKCARD SC,
FVSTOCK FVS,
FIRM F,
PURCHASEORDER PO,
PURCHASEORDERDETAIL PD,
PURCHASEORDERDETAILSUPPLIED PDS
WHERE SM.ID = SMD.MAINTRANSACTIONID
AND SMD.MATERIALID = M.ID
AND SMD.STOCKCARDID = SC.ID
AND SM.PROPREF = FVS.RECORDID(+)
AND FVS.FIELDID(+) = 2559
AND FVS.FLEVEL(+) = 'F'
AND F.ID(+) = SUBSTR (FVS.FVALUE, 1, 9)
AND SM.TRANSDEFID in (999,2329,2344,2370,150000903,150005362)
AND SMD.CANCELLED = 0
AND SMD.STOCKUPDATED = 1
AND SMD.ID = PDS.STOCKMAINTRANSACTIONDETAILID
AND PDS.ORDERDETAILID = PD.ORDERDETAILID
AND PO.ORDERID = PD.ORDERID
AND (M.ID = {@MATERIALID@} OR {@MATERIALID@} = 0)
AND (SM.STOREID = {@STOREID@} OR {@STOREID@} = 0)
AND (F.ID = {@SUPPLIERID@} OR {@SUPPLIERID@} = 0)
AND SM.TRANSACTIONDATE BETWEEN {@STARTDATE@} AND {@ENDDATE@}
ORDER BY F.NAME, M.EXTERNALCODE, SM.TRANSACTIONDATE
Really appreciate the help!
Thanks.Hi,
Welcome to the forum!
To convert to ANSI syntax, replace join conditions in the WHERE clause
FROM x
, y
WHERE x.x1 = y.y1
AND x.x2 = y.y2with ON conditions in the FROM clause:
FROM x
JOIN y ON x.x1 = y.y1
AND x.x2 = y.y2In inner joins, conditions that do not reference 2 tables are not really join conditions, so it doesn't matter if they are in the FROM clause or in the WHERE clause.
In your case
SM.TRANSDEFID in (999,2329,2344,2370,150000903,150005362)could be part of a join condition involving sm, or it could be in the WHERE clause. Most people find it clearer if 1-table conditions like this are in the WHERE clause.
Again, this only applies to inner joins. For outer joins, all conditions that apply to a table that may lack matching rows must be included in the FROM clause, like this:
LEFT OUTER JOIN fvstock fvs ON sm.propref = fvs.recordid
AND fvs.fieldid = 2559
AND fvs.flevel = 'F'Try it.
If you have trouble, post your best attempt, along with CREATE TABLE and INSERT statements for a little sample data from all the tables involved, and the results you want from that data. Simplify the problem. Post only the tables and columns that you don't know how to handle.
See the forum FAQ {message:id=9360002}
user8428528 wrote:
AND (M.ID = {@MATERIALID@} OR {@MATERIALID@} = 0)
AND (SM.STOREID = {@STOREID@} OR {@STOREID@} = 0)
AND (F.ID = {@SUPPLIERID@} OR {@SUPPLIERID@} = 0)
AND SM.TRANSACTIONDATE BETWEEN {@STARTDATE@} AND {@ENDDATE@}This is not valid Oracle SQL. Is {@MATERIALID@} some kind of variable? -
How to SQL to create a new field reset by new value
Table only got 1 field eg.
company_name
DELL
DELL
DELL
HP
HP
IBM
IBM
IBM
How create a SQL to create a running number field that reset for a value? Thanks.
It should look something like this :
SNO company_name
1 DELL
2 DELL
3 DELL
1 HP
2 HP
1 IBM
2 IBM
3 IBMHallo,
SELECT row_number() over (partition by company_name order by company_name), company_name
FROM company
Regards
Dmytro Dekhtyaryuk -
Hi All,
I am using EXEC SQL join in my ABAP report,but it is giving dump.could you please correct my following code?
START-OF-SELECTION.
CONCATENATE '%' pa_match '%' INTO tp_match.
EXEC SQL.
OPEN dbcur FOR
SELECT kunnr,name1, banks
FROM kna1 as a inner join
knbk as b
on akunnr = bkunnr
WHERE a.kunnr = b.kunnr and
upper(a~name1) LIKE :tp_match
ENDEXEC.
DO.
EXEC SQL.
FETCH NEXT dbcur INTO :wa_name1
ENDEXEC.
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND wa_name1 TO ta_name1.
COLLECT wa_name1 INTO ta_name1.
ENDDO.
EXEC SQL.
CLOSE dbcur
ENDEXEC.Remove the 'As' from the statement
EXEC SQL.
OPEN dbcur FOR
SELECT kunnr,name1, banks
FROM kna1 a inner join "Delete 'AS' here
knbk b
on a~kunnr = b~kunnr
WHERE a.kunnr = b.kunnr and
upper(a~name1) LIKE :tp_match
ENDEXEC. -
Hi
How to use ANSI SQL JOINS (9i) for below query
SELECT EMP.EMPNO,EMP_T.TNO,EMP_T.SAL1 FROM EMP,EMP_T WHERE EMP.EMPNO=EMP_T.TNO
UNION ALL
SELECT EMP.EMPNO,EMP_T.TNO,EMP_T.SAL2 FROM EMP,EMP_T WHERE EMP.EMPNO=EMP_T.TNO
UNION ALL
SELECT EMP.EMPNO,EMP_T.TNO,EMP_T.SAL3 FROM EMP,EMP_T WHERE EMP.EMPNO=EMP_T.TNO
EMPNO TNO SAL1
7369 7369 100
7499 7499 1000
7566 7566 400
7782 7782 4000
7369 7369 200
7499 7499 2000
7566 7566 500
7782 7782 5000
7369 7369 300
7499 7499 3000
7566 7566 600
EMPNO TNO SAL1
7782 7782 6000
Regards
MMSELECT EMP.EMPNO,
EMP_T.TNO,
EMP_T.SAL1
FROM EMP
JOIN EMP_T ON ( EMP.EMPNO = EMP_T.TNO )
UNION ALL
SELECT EMP.EMPNO,
EMP_T.TNO,
EMP_T.SAL2
FROM EMP
JOIN EMP_T ON ( EMP.EMPNO = EMP_T.TNO )
UNION ALL
SELECT EMP.EMPNO,
EMP_T.TNO,
EMP_T.SAL3
FROM EMP
JOIN EMP_T ON ( EMP.EMPNO = EMP_T.TNO ) -
I am trying to debug a problem where a 'select * from' is being added to the sql statement a Visual Basic 6.0 application is sending to an Oracle 8.1.7 database. Any ideas what may be causing the problem?
The application SQL is:
SELECT max(work_order_id) AS WORK_ORDER_ID
FROM paint_workorder
WHERE work_order_id like '2003%'
Trace shows the following:
PARSING IN CURSOR #11
SELECT max(work_order_id) as WORK_ORDER_ID, paint_workorder.ROWID
FROM paint_workorder
WHERE work_order_id like :"SYS_B_0"
PARSE ERROR -- (extra select * from)
select * from SELECT max(work_order_id)AS WORK_ORDER_ID
FROM paint_workorder
WHERE work_order_id like :"SYS_B_0"
Somehow, a select * from is being added to the SQL statement being used by the appliciation.
System configuration is:
CLIENT:
Windows 2000 Professional Service Pack 3
Visual Basic 6.0
Oracle 8.1.7 client
ADO 2.7 & 2.8
Microsoft OLE DB provider
Server:
Oracle 8.1.7
Any help is appreciated.Thanks for the reply. We started using the Oracle Provider and got past the malformed SQL problem; however, we are using some grids that started to complain about not having the Microsoft OLE DB.
We are now maintaining two connections to the database. One using the Oracle provider and one using the Microsoft provider. This is working in most areas; however we are still having problems managing two connections in the application.
At my development/QA site, I have 7 clients using the Microsoft provider connecting to the database with no problems. It is at the customer site where the problem occurs and I cannot reproduce it at the development site.
We ran tool which lists the dlls my application uses and we seem to be synched up in both locations.
Any ideas?
Thanks -
OWB 10.2.0.4 ANSI SQL join problem
Hi
Its seams to me, that in OWB 10.2.0.4 there is something broken with ANSI SQL joins and instead of ANSI joins there is used oracle SQL joins only. Maybe someone can point some solutions? I can’t rewrite all mappings with union and other operators. And manually pl/sql editing also would be big problem."Am I correct in assuming you did not code ANSI joins?" -> yes, i am coding Oracle SQL joins and with this option just generating ANSI joins.
With ANSI SQL join you can use OR and IN operands (and code looks more readable).
It is question of performance (so for example 80% of dataset you can join by one column other 15% by second etc ..). So this all can be rewritten also in Split->join->union all, but if you have several such joins, this will be painfully. -
We've just recently noticed that when we add a new table through Discoverer Admin, there are multiple joins created for the same tables (in 1 case we have 11 identical joins created between the same 2 tables). I know we can switch off the button to create joins but wondered if there was a way to limit it to only 1 join created per table. Any suggestions?
Thanks,
JanetUnfortunately there's no way to limit the number of joins between 2 tables using the Administrator. Or joins are setup automatically by using the FK's or on Matching Column Names or you've to set them up by hand. You might think of using the gateway and create a script to populate the gateway tables with just 1 join.
Michael -
SQL Experts,
I have a query below. Can I improve the SQL joining order in highlighted section - Lines 31 to 40
SNIOTM.SNI_PA_OTM_ARC_DRVR -- around 200K rows
SNIOTM.SNI_PA_ORD_SHP_STATUS -- 8 rows
Edited by: 922411 on May 12, 2013 7:42 PM922411 wrote:
SQL Experts,
I have a query below. Can I improve the SQL joining order in highlighted section - Lines 31 to 40
SNIOTM.SNI_PA_OTM_ARC_DRVR -- around 200K rows
SNIOTM.SNI_PA_ORD_SHP_STATUS -- 8 rowsYou need not worry about the Joining Order, Oracle CBO is efficient enough to choose the Most Efficient way of joining the tables. However, it will depend on your Oracle Version, which you have not mentioned. If you are 10g or higher then you certainly need not worry.
If you sense a problem in performance of query, then I will suggest you read the linked threads in {message:id=9360003} and post the details as specified.
Only this will help us provide releavant suggestions and avoid guessing games.
PS:- Do not forget to post Oracle Version and the Explain Plan in {noformat}{noformat} tags, exactly as specified. -
Help - Bean Binding an SQL join to a gui component(jtable) in Netbeans?
Good afternoon. I'd like to ask if there is a way to data bind an SQL Join from 2 or more tables to a
GUI component(Jtable) in Netbeans. All the tutorials show is how to bind all the fields of 1 database table
to the component. Under the BIND/ELements option the IMPORT DATA TO FORM menu only allows
you to choose 1 among the database tables from a selected database.
Is there a way to configure an SQL query and attach it to the component?
Thanks.This is not a Swing problem. Try a NetBeans forum.
-
PL/SQL to create a temp table that will be dropped after session ends
Is it possible in PL/SQL to create a temp table that will be dropped after the session ends? Please provide example if possible. I can create a global temp table in PL/SQL but I am not sure how (if possible) to have it 'drop' once the session ends.
DB: 10g
OS: Wiindoze 2003 Server
:-)As others have mentioned (but probably not clearly explained), Oracle treats temporary tables differently to SQL Server.
In SQL Server you create a temporary table and it gets dropped (automatically I assume, I dont do SQL Server) after the session finishes. This will obviously allow each session to "request" a temporary table to use, then use it, and not have to worry about cleaning up the database after the session has finished.
Oracle takes a different approach...
On the assumption that each session is likely to be creating a temporary table for the same purposes, with the same structure, Oracle let's you create a Global Temporary Table a.k.a. GTT (which you've already come across). You only have to create this table once and you leave it on the database. This then means that any code written to use that table doesn't have to be dynamic code and can be verified and checked at compile time, just like code written for any other table. The difference of a GTT from a regular table is that any data you put into that table can only be seen by that session and will not interfere with any data of other sessions and, when you either commit, or end the session (depending on the "on commit delete rows" or "on commit preserve rows" option used when creating the GTT), that data from your own session will automatically be removed and hence the table is cleaned up that way, whilst the actual table itself remains.
Some people from SQL Server backgrounds try and create and drop tables dynamically in their PL/SQL code, but this leads to problems...
SQL> ed
Wrote file afiedt.buf
1 begin
2 execute immediate 'create table my_temp (x number)';
3 insert into my_temp values (1);
4 execute immediate 'drop table my_temp';
5* end;
SQL> /
insert into my_temp values (1);
ERROR at line 3:
ORA-06550: line 3, column 15:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 3, column 3:
PL/SQL: SQL Statement ignoredi.e. the code will not compile for direct DML statements trying to use that table.
They then try and get around this issue by making their DML statements dynamic too...
SQL> ed
Wrote file afiedt.buf
1 create or replace procedure my_proc is
2 begin
3 execute immediate 'create table my_temp (x number)';
4 execute immediate 'insert into my_temp values (''A'')';
5 execute immediate 'drop table my_temp';
6* end;
SQL> /
Procedure created.... which looks great and it compiles ok... but... when they try and run it...
SQL> exec my_proc;
BEGIN my_proc; END;
ERROR at line 1:
ORA-01722: invalid number
ORA-06512: at "SCOTT.MY_PROC", line 4
ORA-06512: at line 1... oops the code has a bug in it. Our DML statement was invalid.
This is really something that would have been caught at compile time, if the statement had been a direct DML statement rather than dynamic. And thus we see the problem with people trying to write all their code as dynamic SQL... it's more likely to contain bugs that won't be detected at compile time and only come to light at run time... sometimes only under certain conditions and sometimes once it's got into a production environment. Bad Idea!!!! ;)
Far better to never create tables (or most other database objects) at run time. Just create them once as part of the database design/implementation and use them as required, allowing you to catch the most common coding errors up front before they get anywhere near a test environment or worse still, a production environment. -
Problem with SQL to create a temp table to evaluate sort merge join
Can anyone help me with the below sql to enable the performance of the use merge join to be evaluated. This sql is placed in a file and ran from the prompt.
timing start
CREATE table testsql as
SELECT /*+ USE_MERGE(t1000 t8000)*/ t1000, t8000
FROM t1000, t8000
WHERE t1000.ONEPERCENT=1 AND t1000.unique1 = t8000.fk;
timing stop
drop table testsql;
Current error message:
SQL> start h:\exe1.sql
SELECT /*+ USE_MERGE(t1000 t8000)*/ t1000, t8000
ERROR at line 2:
ORA-00904: "T8000": invalid identifier
Elapsed: 00:00:00.01
drop table testsql
ERROR at line 1:
ORA-00942: table or view does not exist
Thanks for your help,
Regards, Chris.SELECT /*+ USE_MERGE(t1000 t8000)*/ t1000, t8000
Are you sure you have columns t1000 and t8000 in one of your tables used in the from clause?
What is the idea of this exercise? what is it that you are trying to evaluate? -
SQL Join help for multiple values in single field.
Hello All,
I need a help, I have two tables T1 and T2
Content of T2 will be like
T2. ID | T2.USERNAME
ID1 | John
ID2 | Peter
ID3 | Mark
Content of T1 is like
T1.ID
ID1 ID2 ID3
ID2
ID1 ID3
I need to join these two tables and replace the T1.ID values with T2.USERNAME, for eg. Row one of T1 should be changed as John Peter Mark.
Note: ID1 ID2 ID3 is a single value.
Thanks for your help.
Sathish.At Volder: I have made a slight enhancement. It's the same thing but the other way around as last week's regular expression thread. Remember the "and then the bird flew away"? ;-)
SQL> create table t1
2 as
3 select 'ID1 ID2 ID3' id from dual union all
4 select 'ID2' from dual union all
5 select 'ID1 ID3' from dual union all
6 select 'ID11 ID2' from dual
7 /
Tabel is aangemaakt.
SQL> create table t2
2 as
3 select 'ID1' id, 'John' username from dual union all
4 select 'ID2', 'Peter' from dual union all
5 select 'ID3', 'Mark' from dual union all
6 select 'ID11', 'Volder' from dual
7 /
Tabel is aangemaakt.
SQL> select * from t1
2 model
3 reference r on (select t2.*, rownum rn from t2)
4 dimension by (rn)
5 measures(id, username)
6 main m
7 dimension by (id)
8 measures(cast(id as varchar(200)) str)
9 rules iterate(100) until (r.id[iteration_number+1] is null)
10 (str[any] = replace(str[CV()], r.id[iteration_number+1],r.username[iteration_number+1]))
11 /
ID STR
ID1 ID2 ID3 John Peter Mark
ID2 Peter
ID1 ID3 John Mark
ID11 ID2 John1 Peter
4 rijen zijn geselecteerd.
SQL> select id
2 , str
3 from t1
4 model
5 reference r on (select id,username,rownum rn from t2)
6 dimension by (rn)
7 measures (id, username)
8 main m
9 dimension by (id)
10 measures (cast(' ' || id || ' ' as varchar2(200)) str)
11 rules iterate(1000) until (r.id[iteration_number+1] is null)
12 ( str[any] = replace
13 ( str[cv()]
14 , ' ' || r.id[iteration_number+1] || ' '
15 , ' ' || r.username[iteration_number+1] || ' '
16 )
17 )
18 /
ID STR
ID1 ID2 ID3 John Peter Mark
ID2 Peter
ID1 ID3 John Mark
ID11 ID2 Volder Peter
4 rijen zijn geselecteerd.At Sathish: just look at the queries we have to come up with to do such a simple thing. As said many times before, I would also encourage you to change the design instead of executing the queries presented by Volder and me.
Regards,
Rob.
Message was edited by:
Rob van Wijk
Just noticed I missed a final TRIM function around "str", so please add this.
Maybe you are looking for
-
New Macbook, lines on screen, help it's a christmas present
Bought are second mac for the wife and daughter, a macbook this time, mrs at work so I decided to open the box and fire it up, load itunes and pictures all software updates, set up email ect ect but to my horror, the book switched on and I was greete
-
I bought my Macbook Pro last July. It's worked well since then. I had a minor run-in with Applecare because my battery was overheating and causing cracks in my top case. That same issue is happening again with my top case, and I'm not sure if it's re
-
Hi There, I am working on converting standard Payables Check printing to be based on BI Publisher (5.6.3). Currently, the client is using a laser printer and the checks are being printed thru standard oracle report. For printing checks, they are usin
-
Failed to close connection for data source "EntityDataSource"
Hi All, I have deployed some PowerView reports on SharePoint 2013. I have open it on sharepoint, wait for 5 mins & then I try to change any filter then I am getting following error as Failed to close connection for data source "EntityDataSource" Erro
-
Don't round values (line graph label)
I need to make a line graph with labeled markers. So, I create a marker design with "%02" (without quotes) as label to show the values. But, if I type, for example, 6,10 into the sheet, the marker's label shows 6,1. But I need show the entire number