Simple excel query
Hi,
I am connecting to an excel spreadsheet. I have no problems connecting but when I query it my app. goes into an infinate loop.
When coding:
rs = stmt.executeQuery(query);
while(rs.next()) {
// display my results
I get valid results fine but after my data has run out the rs.next() still returns true. I only have 25 rows in my spreadsheet but when viewing the sheet in excel all the rows after the 25th are blank. Is there a way in excel delete all the rows after 25th?
I hope someone knows what I'm trying to say and can give me the simple solution I'm sure I'm missing!
Much appreciated,
Vaughne
What I would do is simply check if an entire row in your result set is empty. If so you keep track of that with a counter.
As you can see sometimes there can be empty lines for formating an excel sheet. I would pre-define a number which tell how much rows maybe
empty after eachother. For example 10. Once exeeded this number you stop your loop.
After that to delete the last lines simply do current row number - 10
the predefined number (10) and delete does.
I see you display your data emediatelly.
This has to be changed. And you need to put this into a vector.
This way you can operate on deleting some rows if you want.
Afterwards just loop over the vector and display your results.
Now how does this work.
Cell 1 Cell2 Cell3
1 2 3
5 7 7
5 1 9
Similar Messages
-
Using a SQL for Oracle in Microsoft Excel Query
I am having the most difficult time (in fact, I can't get it to work) trying to use an SQL I created in Toad for Oracle. It works fine in Toad for Oracle...gives me all the data I need. I am trying to use it in Excel for users that don't know SQL or Oracle so they can use the query to extract data they need for Charts, Graphs, etc.
Here is the SQL code from Toad for Oracle:
/* Formatted on 2006/09/22 11:42 (Formatter Plus v4.8.6) */
SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
a_compl_summary.part_sequence, a_compl_summary.part_number,
a_compl_summary.lot_number, a_compl_summary.alert_date,
a_compl_summary.entry_date, a_compl_summary.NAME,
a_compl_summary.MONTH, a_compl_summary.product_family,
a_compl_summary.complaint, a_compl_summary.reportable,
a_compl_summary.product_returned, a_compl_summary.case_desc,
a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
a_compl_summary.root_cause, a_compl_summary.corrective_action,
a_compl_summary.region,
rp_qa_reported_device_codes.reported_device_code,
rp_qa_reported_device_codes.reported_dev_clarification,
rp_qa_reported_device_codes.reported_dev_code_desc,
rp_qa_patient_codes.patient_code,
rp_qa_patient_codes.patient_code_clarif,
rp_qa_patient_codes.patient_code_severity,
rp_qa_patient_codes.description
FROM chsuser.a_compl_summary,
chsuser.rp_qa_patient_codes,
chsuser.rp_qa_reported_device_codes
WHERE ( (a_compl_summary.product_division = 'CP')
AND ( a_compl_summary.entry_date >= :date1
AND a_compl_summary.entry_date <= :date2
AND ( a_compl_summary.product_family LIKE :pf1
OR a_compl_summary.product_family LIKE :pf2
OR a_compl_summary.product_family LIKE :pf3
OR a_compl_summary.product_family LIKE :pf4
OR a_compl_summary.product_family LIKE :pf5
AND (a_compl_summary.region = :r1)
AND ( a_compl_summary.NAME = :c1
OR a_compl_summary.NAME = :c2
OR a_compl_summary.NAME = :c3
OR a_compl_summary.NAME = :c4
OR a_compl_summary.NAME = :c5
AND (a_compl_summary.complaint = :yorn)
AND ( rp_qa_reported_device_codes.reported_dev_clarification LIKE
:cl1
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
:cl2
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
:cl3
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
:cl4
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
:cl5
AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
:dc1
AND (a_compl_summary.incident_number =
rp_qa_patient_codes.incident_number
AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
AND (a_compl_summary.incident_number =
rp_qa_reported_device_codes.incident_number
AND (a_compl_summary.case_number =
rp_qa_reported_device_codes.case_number
AND (a_compl_summary.part_sequence =
rp_qa_reported_device_codes.part_sequence
AND (rp_qa_reported_device_codes.incident_number =
rp_qa_patient_codes.incident_number
AND (rp_qa_reported_device_codes.case_number =
rp_qa_patient_codes.case_number
AND (rp_qa_reported_device_codes.part_sequence =
rp_qa_patient_codes.part_sequence
)Can someone help me...maybe point out what I'm doing wrong.
Note: I also tried creating this query in Microsoft Query (the simple way) and when I first create it...it works...But then if I go back in to edit the query, and refresh the query or try to Return data to Excel, it gives me a ORA-00936 error message.
Why it works when I first create the query in Excel, I don't know. But I have to validate the queries I'm creating (SQL or not) and I can't validate it if every time I go into edit the query (which may have to happen; that's why I have to fix this before I can submit my validation).
Anyway, any help would be greatly appreciated.Okay, I know I'm replying to my own threads here...but I want to add a little bit more information again.
I was successful in figuring out that changing the :criteria to a ? worked.
I tested this on 1 criteria at a time. Adding one more scenario ? at at time.
It only worked up until about 3 scenarios of each criteria.
Then when I refreshed the query in Microsoft Excel Query, I got an "out of memory" error, and then it ended up just erasing the SQL I had been using.
Here's the SQL I had where it gave me this error. Am I possibly just making Excel work too hard? It just doesn't make sense because Toad for Oracle handled it in like 4 seconds. Which brings me back to an intial question I had. Can Excel use Toad for Oracle somehow?
Here's the code:
SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
a_compl_summary.part_sequence, a_compl_summary.part_number,
a_compl_summary.lot_number, a_compl_summary.alert_date,
a_compl_summary.entry_date, a_compl_summary.NAME,
a_compl_summary.MONTH, a_compl_summary.product_family,
a_compl_summary.complaint, a_compl_summary.reportable,
a_compl_summary.product_returned, a_compl_summary.case_desc,
a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
a_compl_summary.root_cause, a_compl_summary.corrective_action,
a_compl_summary.region,
rp_qa_reported_device_codes.reported_device_code,
rp_qa_reported_device_codes.reported_dev_clarification,
rp_qa_reported_device_codes.reported_dev_code_desc,
rp_qa_patient_codes.patient_code,
rp_qa_patient_codes.patient_code_clarif,
rp_qa_patient_codes.patient_code_severity,
rp_qa_patient_codes.description
FROM chsuser.a_compl_summary,
chsuser.rp_qa_patient_codes,
chsuser.rp_qa_reported_device_codes
WHERE ( (a_compl_summary.incident_number =
rp_qa_patient_codes.incident_number
AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
AND (a_compl_summary.incident_number =
rp_qa_reported_device_codes.incident_number
AND (a_compl_summary.case_number =
rp_qa_reported_device_codes.case_number
AND (a_compl_summary.part_sequence =
rp_qa_reported_device_codes.part_sequence
AND (rp_qa_reported_device_codes.incident_number =
rp_qa_patient_codes.incident_number
AND (rp_qa_reported_device_codes.case_number =
rp_qa_patient_codes.case_number
AND (rp_qa_reported_device_codes.part_sequence =
rp_qa_patient_codes.part_sequence
AND (a_compl_summary.product_division = 'CP')
AND ( a_compl_summary.entry_date >= ?
AND a_compl_summary.entry_date <= ?
AND ( a_compl_summary.product_family LIKE ?
OR a_compl_summary.product_family LIKE ?
OR a_compl_summary.product_family LIKE ?
OR a_compl_summary.product_family LIKE ?
OR a_compl_summary.product_family LIKE ?
AND (a_compl_summary.region = ?)
AND ( a_compl_summary.NAME = ?
OR a_compl_summary.NAME = ?
OR a_compl_summary.NAME = ?
OR a_compl_summary.NAME = ?
OR a_compl_summary.NAME = ?
AND (a_compl_summary.complaint = ?)
AND ( rp_qa_reported_device_codes.reported_dev_clarification LIKE
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
)) -
Simple Spatial Query caused ORA-03113: end-of-file on communication channel
I try to run a simple spatial query to find the ID's which inside the specified circle
select n.ID,n.FEATURE_ID
from NC_MANGROVE n
where sdo_relate(n.shape,
mdsys.sdo_geometry(2003,null,null,
mdsys.sdo_elem_info_array(1,1003,4),
mdsys.sdo_ordinate_array(848948,834940,848908,834980,848908,834900)),
'mask=ANYINTERACT querytype=WINDOW')='TRUE';
but it end up of ORA-03113: end-of-file on communication channel
Then I try another query, which I think do the similar thing
select n.ID,n.FEATURE_ID
from NC_MANGROVE n
where sdo_within_distance(n.shape,
mdsys.sdo_geometry(2001,null,mdsys.sdo_point_type(848908,834900,null),null,null),
'distance=40')='TRUE';
but same error occurs.
Is it the SQL*net configure problem. I am using Oracle 8.1.7 for both client and server.
Please help
TommyDoes SDO_FILETER Queries work fine? If so there is already reported bug and patch for that on Metalink site. Get all the patches for 8.17 spatial and install those.
-
A simple select query taking forever
Hi All
I am not able to execute a simple select query, I traced my session and here is TKPROF of that Trace.
Solaris 8 , Oracle 10.2.0.4.0
TKPROF: Release 10.2.0.4.0 -
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Trace file: 502_ora_28260.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
select OBJECT_ID , ORACLE_USERNAME , SESSION_ID
from
v$locked_object
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.03 32.86 0 0 6 0
total 3 0.03 32.86 0 0 6 0
Misses in library cache during parse: 1
Optimizer mode: CHOOSE
Parsing user id: SYS
Rows Row Source Operation
0 MERGE JOIN (cr=0 pr=0 pw=0 time=60 us)
0 SORT JOIN (cr=0 pr=0 pw=0 time=58 us)
0 MERGE JOIN (cr=0 pr=0 pw=0 time=42 us)
1 SORT JOIN (cr=0 pr=0 pw=0 time=2443 us)
1105 FIXED TABLE FULL X$KSUSE (cr=0 pr=0 pw=0 time=1204 us)
0 SORT JOIN (cr=0 pr=0 pw=0 time=41 us)
1001 FIXED TABLE FULL X$KTCXB (cr=0 pr=0 pw=0 time=16132 us)
0 SORT JOIN (cr=0 pr=0 pw=0 time=0 us)
0 FIXED TABLE FULL X$KTADM (cr=0 pr=0 pw=0 time=0 us)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
buffer busy waits 34 0.97 32.83
SQL*Net break/reset to client 1 0.00 0.00
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.03 32.86 0 0 6 0
total 3 0.03 32.86 0 0 6 0
Misses in library cache during parse: 1
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 1 19.00 19.00
buffer busy waits 34 0.97 32.83
SQL*Net break/reset to client 1 0.00 0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 0 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 0 0.00 0.00 0 0 0 0
Misses in library cache during parse: 0
1 user SQL statements in session.
0 internal SQL statements in session.
1 SQL statements in session.
Trace file: 502_ora_28260.trc
Trace file compatibility: 10.01.00
Sort options: default
0 session in tracefile.
1 user SQL statements in trace file.
0 internal SQL statements in trace file.
1 SQL statements in trace file.
1 unique SQL statements in trace file.
64 lines in trace file.
32 elapsed seconds in trace file. There is nothing fishy in alert logs... Please guide
ThanksThere it is TOP
$ RUMPSHAKER>top
load averages: 6.63, 7.45, 7.88; up 33+12:02:33
3631 processes: 3616 sleeping, 5 zombie, 1 stopped, 9 on cpu
CPU states: 58.6% idle, 18.2% user, 23.2% kernel, 0.0% iowait, 0.0% swap
Memory: 192G phys mem, 92G free mem, 96G swap, 96G free swap
PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
13752 ora0005 1 19 0 4243M 4219M sleep 5:21 62.78% oracle
17758 ora0005 1 25 0 1174M 1156M cpu 1:05 37.12% oracle
17923 root 1 57 0 18M 14M sleep 689:07 13.59% ecap_monitor
20777 root 12 58 0 14M 13M sleep 864:33 11.55% OracleAgent
18884 ora0004 1 1 0 830M 813M sleep 0:01 9.54% oracle
12070 ora0004 61 58 0 320M 315M sleep 28.5H 8.29% emagent
20347 root 16 59 0 33M 25M sleep 26.0H 6.34% caiUxsA2
17949 ist0005 1 53 0 7984K 4984K cpu 0:00 3.93% top
1 root 1 59 0 2912K 1288K sleep 32.2H 3.75% init
15035 ora0001 1 46 0 32M 22M sleep 166:43 2.98% tnslsnr
5748 ora0004 11 54 0 516M 496M sleep 389:37 2.78% oracle
20567 ora0004 1 55 0 27M 22M sleep 0:00 2.69% sqlplus
6730 ora0001 1 33 0 632M 616M sleep 0:06 2.67% oracle
20557 ora0004 1 56 0 27M 23M sleep 0:00 2.53% sqlplus
5355 ora0005 1 59 0 1154M 1137M sleep 0:04 2.46% oracleand VMSTAT 2 5
$ RUMPSHAKER> vmstat 2 5
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 s1 s2 sd in sy cs us sy id
6 8 0 143125576 74272080 4628 24012 488 150 149 0 0 4 4 -2 0 25037 192698 65249 38 26 36
1 3 0 162803992 95246464 1989 6989 0 4 4 0 0 6 6 0 0 9170 57822 26434 8 13 79
1 7 0 162801352 95240296 3043 15633 4 9737 9682 0 0 0 0 0 0 11277 73516 38200 16 16 68
3 10 0 162801560 95227920 3326 12729 16 16862 16774 0 0 1 1 0 0 11377 86054 44758 16 17 68
1 10 0 162784520 95186488 9638 48359 24 11682 11626 0 0 13 13 0 0 13484 149366 44205 23 29 47 -
Simple spatial query with different SRID
Can anyone help me with just a real simple spatial query with different SRID.
Here is the error i get when i perform the query:
AND SDO_RELATE(A.geometrie_point, B.GEOMETRIE_POLYGONE, 'mask=anyinteract querytype=WINDOW') = 'TRUE'
ERROR at line 4:
ORA-00604: error occurred at recursive SQL level 1
ORA-13207: incorrect use of the [IN COMPATIBLE BOUNDS in SDO_RELATE] operator
ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 84
ORA-06512: at line 4Hi,
I am using 8.1.7.2 and i have the lattest spatial patch.
From the start i had different SRID. The only thing i changed was the bounds of the coordinate system.
I reset my bounds of the coordinate system with SRID 8307 to -180,
180 in X (longitude), and -90,90 in Y (latitude) to see if the query window geometry
(geom2) will be transformed to the coordinate system of the layer geometries (geom1)
Her is the content of the user_sdo_geom_metadata :
GIS_PCP GEOMETRIE_POINT
SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -5800000, 3600000, .00000005), SDO_DIM_ELEMENT('Y', 3516000, 6000000, .00000005))
82227
GIS_TEST GEOMETRIE_POLYGONE
SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -180, 180, .00000005), SDO_DIM_ELEMENT('Y', -90, 90, .00000005))
8307
Here is my query :
select /*+ ordered */ A.no_point
from gis_pcp A, gis_test B
WHERE SDO_RELATE(A.geometrie_POINT, B.GEOMETRIE_POLYGONE, 'mask=anyinteract querytype=WINDOW') = 'TRUE';
Here is my result :
WHERE SDO_RELATE(A.geometrie_POINT, B.GEOMETRIE_POLYGONE, 'mask=anyinteract querytype=WINDOW') = 'TRUE'
ERROR at line 3:
ORA-00604: error occurred at recursive SQL level 1
ORA-13207: incorrect use of the [IN COMPATIBLE BOUNDS in SDO_RELATE] operator
ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 84
ORA-06512: at line 4
If i change the bounds of GIS_TEST to the exact bouns of GIS_PCP then i dont have the error message above and i have correct results. Do i have the adjust the bounds of every layer to fit the biggest bound? -
Simple SQL Query and Parameters and LOV
Newbie and trying to work thru building a simple sql query with a single table query and use a parameter and lov.
Can anyone point me to an example.
simple query:
select cust_id, name_desc, name_add1, name_add2, name_city
from customer_table
where cust_id = :cust_parm
This works in straight sql and in the query builder by prompting for the customer ID. When building a parameter using LOV or search, it doesn't seem to detect the variable.
Thanks..
DDIf you are using version 11g, then as soon as you save the query in the data model, it should notice the parameter and ask if you want to add the parameter to the data model. What version of BIP are you using?
What happens if you exclude the parameter from the query and simply hard-code the criteria? Can you generate XML data?
From your wording, it sounds like you're trying to create a parameter from the LOV dialog. LOVs and parameters are totally distinct. After each are created separately, then you configure the parameter to use the LOV. -
Can anyone help me with just a real simple spatial query. All I want to do is identify which police district a parcel falls in. I have two shapefiles police and parcel and I know I should do an relate but I just can't figure out to get the answer back. Can anyone help me.
MattHere is an example to try...
select pd.district_name
from parcels p,
police_district pd
where p.apn = 'XXXXXXXX'
and mdsys.sdo_relate
(p.shape,pa.shape,'querytype=window mask=anyinteract') = 'TRUE';
Note that the table names have aliases (p and pd).
I am just learning Oracle Spatial too but this example should work.
Tom Elder
City of Phoenix
[email protected] -
Simple SQL query statement is needed
I need a simple SQL query to fetch records which is existed in all the departments.
for example: i want to list the employees which are existed in each and every department.. not sure how should i get those.. will anyone help me please.. thanks in advanceI think it would be wise to go to the following training:
Oracle Database <version> : Introduction to SQL
You will get the information you are looking for in five days. You can go find a tutorial on ANSI SQL, as advised by this board for free, to fix your immediate problem with a simple query. But, I personally recommend a more formal class specific to Oracle, as you will also get information about PL/SQL, and you get the benefit with working with other DBA/programmers when you are learning. This will solve your immediate issue, and any future issues with the language.
You can find it in the Education section of the Oracle website. -
Hyperion Workspace Financial Reporting Export to Excel Query-Ready Missing
Hyperion Workspace Financial Reporting Export to Excel "Query-Ready" option is Missing in the dropdown when you go to File>Export>Excel
Only the "Fully Formatted" option is available.
From what I recall this option for a "query-ready" export should be available from the HTML preview?
Is there something in configuration that needs to be enabled or something that needs to be checked on to get this option?
We are running 11.1.1.3
The Query-Ready option is available when exporting forms in Planning.
When opening Financial Reports in Smartview the option for "Query-Ready" is available.
For some reason this is not showing up in workspace, does it not exist in 11.1.1.3? Is this a bug?
TIAHi,
The option to export the financial report output in "Query-Ready" format is actually at the bottom right hand corner of the report page (look at the report footer) instead of File>Export>Excel.
Hope this helps
Genti -
Can not execute a simple update query with ms access
Hi
I am trying to execute a simple update query , this is the code I am running : I get no exeptions but the db is not being updated .
When I copy my query into access it works !
The table / columns are spelled correctly and I am able to execute select queries.
can anyone figure out what is going on
Thanks shahar
public static void main(String[] args) {
MainManager mainManager = MainManager.getInstance();
Log log = Log.getInstance();
try {
log.writeDebugMessage("befor executing query");
//stmt.executeUpdate("update trainee set Trainee_Name = 'shahar&Rafi' where Trainee_Id = 1 ");
//stmt = null ;
PreparedStatement stmt1 = con.prepareStatement("UPDATE Trainee SET Trainee_Name =? WHERE Trainee_Id =?");
String name = new String("Shahar&Rafi");
int Id = 1 ;
stmt1.setString(1,name);
stmt1.setInt(2,Id);
System.out.println(stmt1.toString());
stmt1.execute();
log.writeDebugMessage("After executing query");
catch (SQLException e ){
System.err.println("SQLException: " + e.getMessage());
}Hi All,
got the problem solved at last.
first, in the SQL string all the values must be within " ' "
for example:
INSERT INTO Trainee(Trainee_Id , Trainee_password , Trainee_Address, Trainee_Name , Trainee_Phone , Trainee_Gender , Trainee_SessionTime , Trainee_Purpose , Trainee_HealthStatus , Trainee_StartDate , Trainee_Birthday) VALUES (6,'333','hhhh','rafi',048231821,true,63,4,true, ('Feb 22, 2002'), ('Feb 22, 2002'))
second and more important,
a 'dummy' sql select query must be performed after an update query
example for code:
try{
DB.MainManager.getInstance().ExecuteUpdateQuery(A);
DB.MainManager.getInstance().getStatement().executeQuery("SELECT * FROM Trainee");
where A is the update query. -
Translating Excel query into flat file(.CSV)
Hi,
I have a requirement where i need the Excel Queries to be displayed in Flat file(.CSV) format.
To be more clear i have an excel query but my client requires this query to be displayed in a Flat file format. Can someone explain me how i can acheive this.
ThanksHi All,
Thanks for all the information provided by i missed mentioning one point, actually thse queries are to be automatically schedule. the requirement is like this i need to bring to extract data and build queries export it as a .CSV file these queries are not end user queries so they have to be automatically scheduled and will be picked up by an interface so they do some mapping with the .CSV file we provide.
So we decided to do it in Reporting Agent in Excel format and automate it and send the file to a specific location from where the Interface team can pick it. which doesnt need an user to run the query.
so can someone tell me if i can automate a query and as well as have the query in .CSV format?? I hope i was clear
Thanks. -
A simple sub query
I have a table called instrument with a field called id_inst
instrument
id_inst
0000203
There is another table called instrument_xref
instrument_xref
id_inst id_inst_xref
0000203 890000
I want to use a sub query that will give the output
id_inst id_inst_xref
0000203 890000
The subquery I am using is not working
Select i.id_inst,insx.id_inst_xref
from instrument i,instrument_xref insx
where i.id_inst = (Select ???
Can some one please help?You don't need a subquery :
SQL> Select i.id_inst,insx.id_inst_xref
2 from instrument i,instrument_xref insx
3* where i.id_inst = insx.id_inst;anyway :
SQL> Select i.id_inst,insx.id_inst_xref
2 from instrument i,instrument_xref insx
3* where i.id_inst = (select id_inst from instrument_xref); -
Hi all,
I have a simple update query problem. I have four tables
activist(activist_id,first_name,last_name,c_state),
membership(activist_id,g_n_id),
group_network(g_n_id,g_n_type_id),
school_grop_det(g_n_id,state). For some records in activist table the c_state column is null, i want to update that column with state column of school_group_det table.
Here is the query for the states which are null
select distinct a.activist_id,a.first_name,a.last_name,
a.c_state,sd.state from activist a,membership m,
group_network g,school_group_det sd where
a.activist_id=m.activist_id and g.g_n_id=m.g_n_id and
g.g_n_id=sd.g_N_id and a.c_state is null and g.g_n_type_id='1001'
order by a.activist_id
I got the activist_id,first_name,last_name,c_state from activist and state from school_group_det. now i as i told you want to update the c_state with state column of school_group_Det table.
Pleae any one help me
Thanks
SrinivasHi all,
I have a simple update query problem. I have four tables
activist(activist_id,first_name,last_name,c_state),
membership(activist_id,g_n_id),
group_network(g_n_id,g_n_type_id),
school_grop_det(g_n_id,state). For some records in activist table the c_state column is null, i want to update that column with state column of school_group_det table.
Here is the query for the states which are null
select distinct a.activist_id,a.first_name,a.last_name,
a.c_state,sd.state from activist a,membership m,
group_network g,school_group_det sd where
a.activist_id=m.activist_id and g.g_n_id=m.g_n_id and
g.g_n_id=sd.g_N_id and a.c_state is null and g.g_n_type_id='1001'
order by a.activist_id
I got the activist_id,first_name,last_name,c_state from activist and state from school_group_det. now i as i told you want to update the c_state with state column of school_group_Det table.
Pleae any one help me
Thanks
Srinivas -
Execute SQL Task fails when specific column names are mentioned in Excel Query
Hi,
I have a requirement for extracting Excel data with thespecific column order. So instead of using the below query,
Select * From [Sheet1$A1:ZZ1]
I use the below one,
Select col1,
col2,
col91
From [CRM$A1:ZZ1]
So I have totally 91 columns.
I don't face any issues when i use the before query. i.e. direct select * from sheet1
But when i specify column names and do a select from the sheet it throws error as below,
[Execute SQL Task] Error: Executing the query "Select
[Col1]
From [Sheet1$..." failed with the following error: "No value given for one or more required parameters.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not
set correctly, or connection not established correctly.
I just need to retrieve the column name alone and not any of the values to it. So when i do simple select * it gives the column names in the order of what it is been with the excel. But i do want it to be sorted in alphabetically and to retrieve the column
names.
I am not getting any proper solution for this for past 1 and a half days. May anyone of you please help me get it sorted? - Thank you!
--------------------------- Radhai Krish | Golden Age is no more far | --------------------------Please use something like below:
SELECT F1 AS Col1, F2 AS Col2, F3 AS Col3, ...
FROM [Sheet1$A1:ZZ1]
Cheers,
Vaibhav Chaudhari
[MCTS],
[MCP] -
"System Resource Exceeded" for simple select query in Access 2013
Using Access 2013 32-bit on a Windows Server 2008 R2 Enterprise. This computer has
8 GB of RAM.
I am getting:
"System Resource Exceeded" errors in two different databases
for simple queries like:
SELECT FROM .... GROUP BY ...
UPDATE... SET ... WHERE ...
I compacted the databases several times, no result. One database size is approx 1 GB, the other one is approx. 600 MB.
I didn't have any problems in Office 2010
so I had to revert to this version.
Please advise.
Regards,
M.R.Hi Greg. I too am running Access on an RDP server. Checking Task Manager, I can see many copies of MSACCESS running in the process list, from all users on the server. We typically have 40-60 users on that server. I am only changing the Processor Affinity
for MY copy, and only when I run into this problem. Restarting Access daily, I always get back to multi-processor mode soon thereafter.
As this problem only seems to happen on very large Access table updates, and as there are only three of us performing those kind of updates, we have good control on who might want to change the affinity setting to solve this problem. However, I
understand that in other environments this might not be a good solution. In my case, we have 16 processors on the server, so I always take #1, my co-worker here in the US always takes #2, etc. This works for us, and I am only describing it here in case it
works for someone else.
The big question in my mind is what multi-threading methods are employed by Microsoft for Access that would cause this problem for very large datasets. Processing time for an update query on, say, 2 million records is massively improved by going down
to 1 processor. The problem is easily reproduced, and so far I have not seen it in Excel even when working with very large worksheets. Also have not seen it in MS SQL. It is just happening in Access.
Maybe you are looking for
-
More trouble with timezones when storing value in TS WITH LTZ
Using Oracle 9i, JDK 1.4.2. I have a script using the Jakarta Jelly framework to initialize my db. When I run the script, I want to set the current time in several "TIMESTAMP WITH LOCAL TIME ZONE" columns. Before the time change, the following excerp
-
Posting modified data from adf table.
Hi, I'm still novice in JDeveloper and ADF. I need to exchange data between two records and store changes in the database. If I'm using the code below public void exchangeData(String iterator) { BindingContainer bindings = getBindings(); DCIteratorBi
-
I lost the tool bar on top. I can no longer see the Bookmarks, Tools, or Help links. I had them in when I began with your browser but now they're gone. How do I restore the default toolbar?
-
Filteration of BP Master Data Based On BP Group
Hello All, I have a requirement of blocking those BP Codes to display in the Business Partner Form for a specified BP Group whether the User select through Choose From List or Navigate the Form.But the Business Partner details will not be visible to
-
How to pass the document from Webdynpro to SAP R/3?
HI Gurus, I have a requirement to offer a Document uploading option through Java webdynpro screen. I have referred the below link https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71 which has the s