Possible to not use DISTINCT keyword in select query?
I have a high repetition query that polls the database and only ever uses
the first row returned from the query. Using the distinct keyword adds
overhead and increases the use of tempdb in SQL Server in order to remove
any duplicates. Is there a way to instruct kodo not to use distinct on an
ad-hoc basis?
We are using 3.2.3 on SQL Server 2000
Regards
Nathan
Unfortunately, no.
Similar Messages
-
Display distinct rows from Oracle table without using "DISTINCT" keyword.
How to retrieve distinct rows from oracle table without using 'DISTINCT' keyword in SQL?
Thanks in advance.
MihirWelcome to the forum.
Besides GROUP BY you can use UNIQUE instead of DISTINCT as well, but that's probably not wanted here ;) , and the ROW_NUMBER() analytic:
SQL> create table t as
2 select 1 col1 from dual union all
3 select 1 from dual union all
4 select 2 from dual union all
5 select 3 from dual union all
6 select 4 from dual union all
7 select 4 from dual;
Table created
SQL> select col1 from t;
COL1
1
1
2
3
4
4
6 rows selected
SQL> select distinct col1 from t;
COL1
1
2
3
4
SQL> select unique col1 from t;
COL1
1
2
3
4
SQL> select col1 from t group by col1;
COL1
1
2
3
4
SQL> select col1
2 from ( select col1
3 , row_number() over (partition by col1 order by col1) rn
4 from t
5 )
6 where rn=1;
COL1
1
2
3
4 -
is it possible to not use a credit card, to download already purchase apps for iPhone to iPad?
Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact -
Is change to a recommendation setup possible for not using EMET GUI?
Hello.
Is change to a recommendation setup possible for not using EMET GUI?Hello.
↓TEST
1.EMET4.1 Inst
EMET Setup.msi /quiet /norestart
"C:\Program Files\EMET 4.1\EMET_Conf.exe" --import "C:\Program Files\EMET 4.1\Deployment\Protection Profiles\CertTrust.xml
"C:\Program Files\EMET 4.1\EMET_Conf.exe" --import "C:\Program Files\EMET 4.1\Deployment\Protection Profiles\Popular Software.xml
"C:\Program Files\EMET 4.1\EMET_Conf.exe" --system Pinning=Enabled
→recommendation setting OK
2.EMET5 Inst
EMET Setup.msi /quiet /norestart CONFIG_OPTIONS=15
"C:\Program Files\EMET 5.0\EMET_Conf.exe" --import "C:\Program Files\EMET 5.0\Deployment\Protection Profiles\Popular Software.xml
→recommendation setting OK
3.EMET5 Maximum Security Setting(GUI)
4.EMET5 UnInst
msiexec /q /x {ID}
5.EMET4.1 Inst
EMET Setup.msi /quiet /norestart
"C:\Program Files\EMET 4.1\EMET_Conf.exe" --import "C:\Program Files\EMET 4.1\Deployment\Protection Profiles\CertTrust.xml
"C:\Program Files\EMET 4.1\EMET_Conf.exe" --import "C:\Program Files\EMET 4.1\Deployment\Protection Profiles\Popular Software.xml
"C:\Program Files\EMET 4.1\EMET_Conf.exe" --system Pinning=Enabled
→recommendation setting NG
Result
EMET5、EMET4.1 Maximum Security Setting(GUI) → recommendation setting(CUI) → NG
EMET5、EMET4.1 Maximum Security Setting(GUI) → recommendation setting(GUI) → OK
Anticipation
It can return only by GUI? -
Using varchar record in SELECT query
Hi, from a VARCHAR field I get the string ",1,2,3,4,5,6,".
I wish to use it in a SELECT query like:
SELECT * FROM TABLE WHERE ID IN (1,2,3,4,5,6)
Is there a way to obtain this in a tsql query ?
Thank you
StefanoCREATE TABLE t1
col1 INT NOT NULL PRIMARY KEY,
col2 VARCHAR(50) NOT NULL
INSERT INTO t1 VALUES (1,'10,11,12')
INSERT INTO t1 VALUES (2,'13')
INSERT INTO t1 VALUES (3,'14,15')
CREATE TABLE t2
col1 INT NOT NULL PRIMARY KEY,
col2 VARCHAR(50) NOT NULL
INSERT INTO t2 VALUES (10,'A')
INSERT INTO t2 VALUES (11,'B')
INSERT INTO t2 VALUES (12,'C')
INSERT INTO t2 VALUES (13,'D')
INSERT INTO t2 VALUES (14,'E')
INSERT INTO t2 VALUES (15,'F')
SELECT DISTINCT O.col1, O.col2
FROM t1 T
INNER JOIN t2 O
ON (PATINDEX('%,' + CAST(O.col1 AS varchar(10)) + ',%',
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How can i use SUM aggregate in select query?
HI,
GURUS,
How can i use SUM function in Select Query and i want to store that value into itab.
for ex:
TABLES: vbap.
types: begin of ty_vbap,
incluse type vbap,
sum type string,
end of ty_vbap.
data: i_vbap type TABLE OF ty_vbap,
w_vbap type ty_vbap.
SELECT sum(posnr) FROM vbap into table i_vbap up to 5 rows.
(or)
SELECT sum(posnr) FROM vbap into table i_vbap group by vbeln.
loop at i_vbap into w_vbap
" which variable have to use to display summed value.
endloop.
if above code is not understandable pleas give ome sample code on above query.
Thank u,
shabeer ahmed.Hi,
Check this sample code.
TABLES SBOOK.
DATA: COUNT TYPE I, SUM TYPE P DECIMALS 2, AVG TYPE F.
DATA: CONNID LIKE SBOOK-CONNID.
SELECT CONNID COUNT( * ) SUM( LUGGWEIGHT ) AVG( LUGGWEIGHT )
INTO (CONNID, COUNT, SUM, AVG)
FROM SBOOK
WHERE
CARRID = 'LH ' AND
FLDATE = '19950228'
GROUP BY CONNID.
WRITE: / CONNID, COUNT, SUM, AVG.
ENDSELECT.
Regards,
Sravanthi -
Check Index used in an oracle select query
Hi Friends,
I have partitioned an oracle table and created Local Index for the Partitioned table .
Now i want to make sure that the Local index is being used when i perform select query on the Table partition.
How do i confirm that ?
can i check the explain plan generted for the select query to confirm local index is being used ?
Please let me know.
Regards,
DBNow i want to make sure that the Local index is being used when i perform select query on the Table partition.Why? Have you proven that using this local index is the "best" plan?
How do i confirm that ?
can i check the explain plan generted for the select query to confirm local index is being used ?When I asked Google "how to read an oracle explain plan," I found lots of information - what did you find? -
Is it possible to not use PPR for a selectionListener on an af:table
(Using Jdev PS3)
Maybe a strange question but let me put it into context.
I'm more specialized in WebCenter than in ADF so i am mostly using ADF to write portlets or taskflows for WebCenter portals.
when you want portlets to talk to each other you can't use PPR because parameters or events need to be put on the PortletRequest and this is only available when you do a full page refresh instead of a PPR. So, when i want to pass the value of the newly selected record in my af:table, the selectionListener needs to invoke a full page submit and not use PPR.
Is this possible?
I'm asking this here and not in the WebCenter forum because i think the ADF specialist will be more likely to give an answer.Yannick Ongena wrote:
(Using Jdev PS3)
Maybe a strange question but let me put it into context.
I'm more specialized in WebCenter than in ADF so i am mostly using ADF to write portlets or taskflows for WebCenter portals.
when you want portlets to talk to each other you can't use PPR because parameters or events need to be put on the PortletRequest and this is only available when you do a full page refresh instead of a PPR. So, when i want to pass the value of the newly selected record in my af:table, the selectionListener needs to invoke a full page submit and not use PPR.
Is this possible?
I'm asking this here and not in the WebCenter forum because i think the ADF specialist will be more likely to give an answer.Hi Yannick,
If you want portlets to talk to each other then you can use contextual events as well. also check this link it might help http://download.oracle.com/docs/cd/E17904_01/webcenter.1111/e10149/pages_wiring.htm#WCSUG3370 -
BUG REPORT - Please do not use the keyword 'HAS' incomments!
Hi,
It seems that Forte is properly coded, and if you have comments in cursors,
please DO NOT USE the verb 'has', as it's interpreted as the END of the cursor.
Thanks,
J-Paul GABRIELLII wish you folks would get your software working on OSX and Linux so we didn't have to continue using Microsoft malware. I hate having to start up my VM to use Windows. I've pretty much shed myself of all need for Microsoft except for Oracle ME. The main reason I have moved from C# to Python and now to Java was to eliminate any ties to MS…..only to find that ME requires Windows. Oh, the irony!
-
Use of Indexes in select query
Hello,
This is on a 9i install.
There is an index called form_id_idx on the form_id column.
Why does this query use the index (autotrace indicates range scan on the index):
select count(*) from table_name where form_id=123456;
but this query does NOT use the index (autotrace indicates full table scan):
select accepted from table_name where form_id=123456;
This second query runs much faster when I use a hint on the index. Any help/suggestions?
Thanks.The first query does NOT have to go to the Table it all. It can read the index to count the number of rows for "form_id=123456". An Index Range Scan would be fast.
The second query has to go to the table to get the values for the "accepted" column for all the rows that have "form_id=123456". Remember that every get can require a read of 2 or more blocks -- at least one, probably 2 or 3, from the index and 1 from the table. If the number of rows is likely to be large then the number of block get operations would be high. In such cases, Oracle computes that it is faster to do a small set of multiblock reads to read the whole table (Table FullScan).
Therefore, the optimzer weighs :
a. how many rows it thinks will satisfy "form_id=123456"
b. how many index + table block gets it would have to execute (all as single block read calls to the OS)
versus
x. how many multiblock read calls it thinks it has to execute to read the whole table
If the available statistics on number of rows, cardinality or density and the size of the table indicate that operation "x" would be cheaper then operations "a" + "b", Oracle would prefer the latter.
Hemant K Chitale
http://hemantoracledba.blogspot.com -
Using buffering option in select query
Hi All,
Can anybody give me a brief idea on , where we will use the buffering and how we will write it in coding part.Similarly please tell me what will happen if we use by passing buffering addition in select query. Please explain it with steps of sample code if possible.
Thanks in advance.
Regards,
Rakesh.Hi Sharma,
Buffer is used to hold large amount of data.
if internla table is unable to hold data.. Buffer is used..this is mainly used in copy data from PRD to Quality as a part testung.
see the sample code how the buffer is used..
FUNCTION zzrfc_get_zcpeg_fg_related.
*"*"Local Interface:
*" IMPORTING
*" VALUE(PL_VERSION) LIKE ZCPEG_FG_RELATED-PL_VERSION OPTIONAL
*" VALUE(BYPASS_BUFFER) LIKE SY-FTYPE DEFAULT SPACE
*" VALUE(FROM_KEY) LIKE SY-ENTRY DEFAULT SPACE
*" VALUE(GEN_KEY) LIKE SY-ENTRY DEFAULT SPACE
*" VALUE(MAX_ENTRIES) LIKE SY-TABIX DEFAULT 0
*" VALUE(TABLE_NAME) LIKE X030L-TABNAME
*" VALUE(TO_KEY) LIKE SY-ENTRY DEFAULT SPACE
*" EXPORTING
*" VALUE(NUMBER_OF_ENTRIES) LIKE SY-INDEX
*" TABLES
*" ENTRIES STRUCTURE ZCPEG_FG_RELATED
*" EXCEPTIONS
*" INTERNAL_ERROR
*" TABLE_EMPTY
*" TABLE_NOT_FOUND
TABLES dd02l.
DATA: BEGIN OF buf OCCURS 100,
line(4100),
END OF buf.
DATA keyln TYPE i.
DATA: l_tabname LIKE dd25v-viewname.
DATA: l_len TYPE i.
DATA : w_plversion TYPE /sapapo/vrsioex. "PJONNALA
w_plversion = pl_version. "PJONNALA
l_tabname = table_name.
CALL FUNCTION 'VIEW_AUTHORITY_CHECK'
EXPORTING
view_action = 'S'
view_name = l_tabname
no_warning_for_clientindep = 'X'
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
RAISE internal_error.
ENDIF.
IF bypass_buffer NE ' ' AND bypass_buffer NE 'N'.
bypass_buffer = 'Y'.
ENDIF.
IF gen_key CA ' '. ENDIF.
keyln = sy-fdpos.
* read client dependant tables always with client
SELECT SINGLE * FROM dd02l WHERE tabname = table_name
AND as4local = 'A'.
IF dd02l-clidep = 'X'.
*l_len = strlen( sy-mandt ) * cl_abap_char_utilities=>charsize.
* " ecwg. unicode
* move gen_key to gen_key+l_len.
* move sy-mandt to gen_key(l_len).
* add l_len to keyln.
CONCATENATE sy-mandt gen_key INTO gen_key.
keyln = STRLEN( gen_key ) * cl_abap_char_utilities=>charsize.
ENDIF.
* endselect.
IF keyln NE 0 OR from_key = space.
CALL 'C_GET_TABLE' ID 'TABLNAME' FIELD table_name
ID 'INTTAB' FIELD buf-*sys*
ID 'GENKEY' FIELD gen_key
ID 'GENKEY_LN' FIELD keyln
ID 'DBCNT' FIELD number_of_entries
ID 'BYPASS' FIELD bypass_buffer.
ELSE.
CALL 'C_GET_TABLE' ID 'TABLNAME' FIELD table_name
ID 'INTTAB' FIELD buf-*sys*
ID 'FROM_KEY' FIELD from_key
ID 'TO_KEY' FIELD to_key
ID 'DBCNT' FIELD number_of_entries
ID 'BYPASS' FIELD bypass_buffer.
ENDIF.
CASE sy-subrc.
WHEN 4. RAISE table_empty.
WHEN 8. RAISE table_not_found.
WHEN 12. RAISE internal_error.
ENDCASE.
DESCRIBE TABLE buf LINES number_of_entries.
ENDFUNCTION.
Regards,
Prabhudas -
How can i use param in my select query ( see code)
Hi ,
I need to use the param instead of hardcoding the value in the select query , when i did that it is working .
I think the limit of args is only till the end of main and my select query is in a method called Load() .
How can i use the param in my select query .
public static void main(String[] args){
name = args[0];
class= args[1];
new Load();
}//end of main
public Load()
try {
Class.forName(JDBC_DRIVER);
connection = DriverManager.getConnection(DATABASE_URL,"username","pw");
statement = connection.createStatement();
//First Query : pin and ticket number
ResultSet resultSet = statement.executeQuery("SELECT pin , ticketnumber from airport ,year where "+ "year.year_name= Here i need to use the param (instead of hardcoding) and year.class_year= Here too i need to use param");
}// end of method Load()Edited by: 1sai on Sep 24, 2008 7:34 AM
Edited by: 1sai on Sep 24, 2008 7:35 AMMight I suggest you change the structure of your program to the following:
public class Load {
private Connection conn;
private PreparedStatement statement;
public Load(String sql) {
init(sql);
protected void init(String sql) throws Exception {
Class.forName(JDBC_DRIVER);
conn = DriverManager.getConnection(DATABASE_URL, "username", "pw");
statement = conn.prepareStatement(sql);
public ResultSet execute(String p1, String p2) throws Exception {
statement.setString(1, p1);
statement.setString(2, p2);
return statement.executeQuery();
public void close() throws Exception {
if (statement != null)
statement.close();
statement = null;
if (conn != null)
conn.close();
conn = null;
public static void main(String[] args) throws Exception {
String sql = args[0];
String param1 = args[1];
String param2 = args[2];
Load load = new Load(sql);
ResultSet rs = load.execute(param1, param2);
while (rs.next())
System.out.println(rs.get(0));
rs.close();
load.close();
}This allows you to use the same "Load" object for multiple queries with different parameters.
I do not recommend you actually use the code above in any sort of production application. You should really take a look at Spring Framework along with an ORM tool like Hibernate or Ibatis to simplify your DAO layer.
Hope this helps,
David -
Trying to do something as data would be uploaded and edited in grid. At present I am using Ora_Hash.
SELECT
e.ROWID, e.Employee_Id,e.First_Name,e.Last_Name,e.Email,e.Phone_Number,e.Hire_Date,
e.Job_Id,e.Salary,e.Manager_Id,e.Department_Id,
owa_opt_lock.checksum('HR','EMPLOYEES', e.rowid) As HashForThisRow
FROM EMPLOYEES e;
ThxNo you can't.
owa_opt_lock.checksum is a function which is used for optimist locking. It locks the row(probably by using Select FOR Update mechanism) which you select and which you are trying to update. As a result, what you are eventually trying to do is that inside a Select query you are using a function that is locking the rows, which is not allowed. And thus your query will fail with the below mentioned error.
ORA-14551: cannot perform a DML operation inside a query
ORA-06512: at "SYS.DBMS_SQL", line 1575
ORA-06512: at "SYS.OWA_OPT_LOCK", line 172
14551. 00000 - "cannot perform a DML operation inside a query "
*Cause: DML operation like insert, update, delete or select-for-update
cannot be performed inside a query or under a PDML slave.
*Action: Ensure that the offending DML operation is not performed or
use an autonomous transaction to perform the DML operation within
the query or PDML slave.
Thanks,
Ishan -
Using DB Links - Improving SELECT query performance
Hi there,
I am using dblink in the following query:
I would like to improve performance of the query by using hints as per described in the link: http://www.experts-exchange.com/Database/Oracle/9.x/Q_23640348.html. However, i am not sure how can i include this in my select query.
Details are:
Oracle - 9i Database Terminal Release .8
DB Link: TCPROD
Could someone please explain with an example how to use hints to get the query to select data on the remote database and then return the results to the target database?
Many Thanks.
SELECT ec.obid AS prObid,
ec.b2ProgramName AS program,
ec.projectName AS project,
ec.wbsID AS prNo,
ec.wbsName AS title,
ec.revision AS revision,
ec.superseded AS revisionSuperseded,
ec.lifeCycleState AS lifeCycleState,
ec.b2ChangeType AS type,
ec.b2Complexity AS subType,
ec.r1SsiCode AS ssi,
ec.b2disposition as disposition,
ec.wbsOriginator AS requestor,
ec.wbsAdministrator AS administrator,
ec.changepriority as priority,
ec.r1tsc as tsc,
ec.t1comments as tenixComments,
ec.b2securityclass as securityClassification,
ec.t1changesafety as safety,
ec.t1actionofficer as actionOfficer,
ec.t1changereason as changeReason,
ec.t1wbsextchangenumber as extChangeNo,
ec.creator as creator,
to_date(substr(ec.creationdate,
0,
instr(ec.creationdate, ':', 1, 3) - 1),
'YYYY/MM/DD-HH24:MI:SS') as creationdate,
to_date(ec.originatorassigndate, 'YYYY/MM/DD') as originatorassigndate,
zbd.description as description,
zbc.comments as comments
FROM (SELECT obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM awdbt1m4.cmPrRpIt@TCPROD
UNION
SELECT obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM mart1m4.cmPrRpIt@TCPROD
UNION
SELECT obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM mpsdt1m4.cmPrRpIt@TCPROD
UNION
SELECT obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM nondt1m4.cmPrRpIt@TCPROD
UNION
SELECT obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM rnast1m4.cmPrRpIt@TCPROD
UNION
SELECT obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM rnlht1m4.cmPrRpIt@TCPROD
UNION
SELECT obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM rnolt1m4.cmPrRpIt@TCPROD
UNION
SELECT obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM rzptt1m4.cmPrRpIt@TCPRODit's the tablename in the hint, not the column name
something like
SELECT ec.obid AS prObid,
ec.b2ProgramName AS program,
ec.projectName AS project,
ec.wbsID AS prNo,
ec.wbsName AS title,
ec.revision AS revision,
ec.superseded AS revisionSuperseded,
ec.lifeCycleState AS lifeCycleState,
ec.b2ChangeType AS type,
ec.b2Complexity AS subType,
ec.r1SsiCode AS ssi,
ec.b2disposition as disposition,
ec.wbsOriginator AS requestor,
ec.wbsAdministrator AS administrator,
ec.changepriority as priority,
ec.r1tsc as tsc,
ec.t1comments as tenixComments,
ec.b2securityclass as securityClassification,
ec.t1changesafety as safety,
ec.t1actionofficer as actionOfficer,
ec.t1changereason as changeReason,
ec.t1wbsextchangenumber as extChangeNo,
ec.creator as creator,
to_date(substr(ec.creationdate,
0,
instr(ec.creationdate, ':', 1, 3) - 1),
'YYYY/MM/DD-HH24:MI:SS') as creationdate,
to_date(ec.originatorassigndate, 'YYYY/MM/DD') as originatorassigndate
FROM (SELECT /*+ DRIVING_SITE(awdbt1m4.cmPrRpIt) */ obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM awdbt1m4.cmPrRpIt@TCPROD
UNION
SELECT /*+ DRIVING_SITE(mart1m4.cmPrRpIt) */ obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM mart1m4.cmPrRpIt@TCPROD
UNION
SELECT /*+ DRIVING_SITE(mpsdt1m4.cmPrRpIt) */ obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM mpsdt1m4.cmPrRpIt@TCPROD
UNION
SELECT /*+ DRIVING_SITE(nondt1m4.cmPrRpIt) */ obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM nondt1m4.cmPrRpIt@TCPROD
UNION
SELECT /*+ DRIVING_SITE(rnast1m4.cmPrRpIt) */ obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM rnast1m4.cmPrRpIt@TCPROD
UNION
SELECT /*+ DRIVING_SITE(rnlht1m4.cmPrRpIt) */ obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM rnlht1m4.cmPrRpIt@TCPROD
UNION
SELECT /*+ DRIVING_SITE(rnolt1m4.cmPrRpIt) */ obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM rnolt1m4.cmPrRpIt@TCPROD
UNION
SELECT /*+ DRIVING_SITE(rzptt1m4.cmPrRpIt) */ obid,
b2ProgramName,
projectName,
wbsID,
wbsName,
revision,
superseded,
lifeCycleState,
b2ChangeType,
b2Complexity,
r1SsiCode,
b2disposition,
wbsOriginator,
wbsAdministrator,
changepriority,
r1tsc,
t1comments,
b2securityclass,
t1changesafety,
t1actionofficer,
t1changereason,
t1wbsextchangenumber,
creator,
creationdate,
originatorassigndate
FROM rzptt1m4.cmPrRpIt@TCPROD) ec(not tested, of course) -
Sample XML format that can be used to write a SELECT query
Hello,
I want to use and XML file in the scenario FILE to JDBC where i use the operation as SELECT in which i want to embbed an sql statemnet which is equivalent to
SELECT EMPNO, NAME FROM EMPLOYEE WHERE EMPNO>1
as in the form of XML format like,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
<STATEMENT>
<TABLENAME ACTION="SELECT">
<TABLE>EMPTEST</TABLE>
<ACCESS>
<EMPNO></EMPNO>
<NAME></NAME>
</ACCESS>
<KEY>
<EMPNO compareOperation="GT">1</EMPNO>
</KEY>
</TABLENAME>
</STATEMENT>
</ns0:MT_JDBC_SELECT_JDBC_REQ>
Can i do like this?
PLease help me out in using various conditions in the XML file formats like the above.
Thanks,
Soorya.Hello raj,
I would like to write the query in that format where i mentioned as,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
<STATEMENT>
<TABLENAME ACTION="SELECT">
<TABLE>EMPTEST</TABLE>
<ACCESS>
<EMPNO></EMPNO>
<NAME></NAME>
</ACCESS>
<KEY>
<EMPNO compareOperation="GT">1</EMPNO>
</KEY>
</TABLENAME>
</STATEMENT>
</ns0:MT_JDBC_SELECT_JDBC_REQ>
without giving clear SQL statement as you mentioned here like,
<ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
<STATEMENT>
<TABLENAME ACTION="SQL_QUERY">
<ACCESS>SELECT EMPNO, NAME FROM EMPLOYEE WHERE EMPNO > '$EMPNO$</ACCESS>
<KEY>
<EMPNO>1</EMPNO>
</KEY>
</TABLENAME>
</STATEMENT>
</ns0:MT_JDBC_SELECT_JDBC_REQ>
Thanks,
Soorya
Maybe you are looking for
-
I want to execute my application in any computer
Hi!I have a javafx application. I want to execute aplication from any computer.I suppose that I need have executable. How can I do that?thanks
-
No data found error on Form on a Table with report
Hi Everyone, I'm using Application Express 4.1.0.00.32 on Windows 7. I built a Form on a table with report. Earlier I was using rowid as a passing parameter but then I had to change it to primary key column from report to form. So in the "Fetch row p
-
Running 10G as a non local system account on Windows Server 2003
Hi, I have an Oracle 10G database running on Windows Server 2003, SP2. I have created the database and it all works fine while the service is running as the default local system account. However, when I change the user that the service runs as to a d
-
Getting 'Unable to verify account information' when attempting to setup Hotmail account
I enabled two-step verification today on my Hotmail email account. This is my one and only Outlook account and is my 'primary alias' which is correct. I am able to retrieve email on my iPhone and Windows PC just fine - have logged in and out seve
-
Importing org.w3c.dom
I am trying to use DOM for some XML parsing, but I am getting the error that org cannot be found. I looked in the src and org is there with all of the DOM stuff. Why would I be getting this error. I can import everything else just fine. Is there an a