Alternative query options
I am an assisting a co-worker on trying to improve an ugly query and I can't come up with good suggestions, based on all the business rules that have been applied.
The main rule is to try and convert everything from the production system into the data warehouse and if it cannot be converted, create a log for it.
Here is a short test case.
CREATE TABLE ATTY (atty_id number, nme varchar2(20));
INSERT INTO atty VALUES (1, 'Bob');
INSERT INTO atty VALUES (2, 'Perry');
INSERT INTO atty VALUES (3, 'Ben');
CREATE TABLE PHN (phn_id number, atty_id number, phn_no varchar2(15));
INSERT INTO phn VALUES (10,1,'800-555-1234');
INSERT INTO phn VALUES (11,2,'800-555-7890');
INSERT INTO phn VALUES (12,3,'800-555-6541');
CREATE TABLE ATTY_CASE_XREF (atty_id number, pers_id number, case_id number);
-- The attorney representing a person on a case. Could be multiple people and/or attornies per case.
INSERT INTO atty_case_xref VALUES (2, 30, 40);
INSERT INTO atty_case_xref VALUES (2, 31, 40);
INSERT INTO atty_case_xref VALUES (3, 32, 41);
INSERT INTO atty_case_xref VALUES (2, 33, 41);
INSERT INTO atty_case_xref VALUES (1, 34, 42); -- yes this points to nothing (aka bad data to deal with)
CREATE TABLE case (case_id number, docket varchar2(20));
-- Due to bad data, may not always have case for each reference above.
INSERT INTO case VALUES (40, '2013-abcdefg');
INSERT INTO case VALUES (41, '2013-pouyfbkjo');
COMMIT;
The test case query (a simplified version of the real one but captures the concepts)
SELECT ap.atty_id,
ap.nme,
p.phn_no,
c.docket
FROM atty ap
INNER JOIN phn p
ON ap.atty_id = p.atty_id
INNER JOIN atty_case_xref acx
ON ap.atty_id = acx.atty_id
LEFT OUTER JOIN case c
ON acx.case_id = c.case_id
UNION
SELECT ap.atty_id,
ap.nme,
p.phn_no,
NULL
FROM atty ap
INNER JOIN phn p
ON ap.atty_id = p.atty_id
INNER JOIN atty_case_xref acx
ON ap.atty_id = acx.atty_id;
The desired output (and what is output by the above SQL statement is) (order does not matter)
Atty_ID
NME
PHN_NO
DOCKET
1
Bob
800-555-1234
2
Perry
800-555-7890
2013-abcdefg
2
Perry
800-555-7890
2013-pouyfbkjo
2
Perry
800-555-7890
3
Ben
800-555-6541
2013-pouyfbkjo
3
Ben
800-555-6541
Basically, the first part (above the union) creates a record for each attorney on a case, even if a case record is not loaded.
The second part converts just a generic non case record for each unique attorney.
If attorney 1 is listed on 10 cases, need to create 11 records. One for each case and one with no case information
The data warehouse table the data is loaded into serves two purposes. It is a normal data table, but also acts as a code table. That way if someone wants a list of all attorneys, they don't have to do a distinct, but can just query for a certain type of record (don't ask why).
The cost for the real version of this query is 248 Billion and was killed after several days of running as it was still building the result set. The explain plan image I have shows the following row counts, ATTY = 96,255, PHN = 3,284,444, ATTY_CASE_XREF = 11,553,888, CASE = 14,421772. We are looking for options that turn this into a one-pass run (or just reduce the cost) so it would complete in a reasonable time.
Any suggestions need to work on 10.2. This seems like a good place for a MODEL clause, but I still struggle with that syntax.
And the cleanup
DROP TABLE atty purge;
DROP TABLE phn purge;
DROP TABLE atty_case_xref purge;
DROP TABLE case purge;
Glad you asked because I found out a couple of assumptions were no longer valid. The code was developed on 10.2.0.4, and a copy still exists there, but apparently the client had upgraded their DB since I helped out many months ago.
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> select count(*) from dms_attyphn;
COUNT(*)
158612
SQL> select count(*) from dms_phn;
COUNT(*)
3284444
SQL> select count(*) from dms_atty;
COUNT(*)
96255
SQL> select count(*) from dms_ptyatty;
COUNT(*)
11553888
SQL> select count(*) from dms_case;
COUNT(*)
14421772
SQL> select count(*) from dm_phone;
COUNT(*)
2971525
I had also thought that DM_PHONE was empty, but an earlier part of the procedure that this query runs in populates a different set of phone data into the table, so the stats show it as empty, but in reality it had nearly 3 Million rows.
The actual query
SELECT DISTINCT p.cnv_phn_id,
p.cnv_phn_nbr,
pa.cnv_case_id,
ap.cnv_atty_id,
f_remove_site(ap.cnv_phn_cd) cnv_phn_cd,
ap.cnv_phn_cd_dscr,
a.cnv_idnt_id,
c.cnv_site_id
FROM dms_attyphn ap
INNER JOIN dms_phn p
ON ap.cnv_phn_id = p.cnv_phn_id
INNER JOIN dms_atty a
ON a.cnv_atty_id = ap.cnv_atty_id
INNER JOIN dms_ptyatty pa
ON pa.cnv_atty_id = a.cnv_atty_id
LEFT OUTER JOIN dms_case c
ON pa.cnv_case_id = c.cnv_case_id
WHERE NOT EXISTS (SELECT 1
FROM dm_phone dp
WHERE nvl(dp.pers_id_seq,'-1') = nvl(a.cnv_idnt_id,'-1')
AND nvl(dp.case_id_seq,'-1') = nvl(pa.cnv_case_id,'-1')
AND nvl(dp.phone_id,'-1') = nvl(p.cnv_phn_id,'-1')
AND nvl(dp.type_cd,'-1') = nvl(f_remove_site(ap.cnv_phn_cd),'-1'))
UNION
SELECT DISTINCT p.cnv_phn_id,
p.cnv_phn_nbr,
NULL,
ap.cnv_atty_id,
f_remove_site(ap.cnv_phn_cd) cnv_phn_cd,
ap.cnv_phn_cd_dscr,
a.cnv_idnt_id,
NULL
FROM dms_attyphn ap
INNER JOIN dms_phn p
ON ap.cnv_phn_id = p.cnv_phn_id
INNER JOIN dms_atty a
ON a.cnv_atty_id = ap.cnv_atty_id
WHERE NOT EXISTS (SELECT 1
FROM dm_phone dp
WHERE nvl(dp.pers_id_seq,'-1') = nvl(a.cnv_idnt_id,'-1')
AND dp.case_id_seq IS NULL
AND nvl(dp.phone_id,'-1') = nvl(p.cnv_phn_id,'-1')
AND nvl(dp.type_cd,'-1') = nvl(f_remove_site(ap.cnv_phn_cd),'-1'))
The NOT EXISTS are there to prevent this record from being loaded twice into the data warehouse. On the initial load, this will not be an issue and we are discussing removing it from the initial load run. For function f_remove_site(), I have come up with a few lines of SQL that will replace what that function does, in order to remove the SQL -> PL/SQL -> SQL context switches.
We do not have access via SQL*Plus to do trace/explain plan info so the following is taken from PL/SQL Developer (the format looked good in the pre block)
Description Object name Cost Cardinality Bytes
SELECT STATEMENT, GOAL = ALL_ROWS 248006382352 19366615 1950133571
SORT UNIQUE 248006382352 19366615 1950133571
UNION-ALL
FILTER
HASH JOIN RIGHT OUTER 260203 19207303 1939937603
TABLE ACCESS FULL DMS_CASE 111541 14421772 302857212
HASH JOIN 42334 19207303 1536584240
HASH JOIN 9204 159312 10195968
HASH JOIN 884 159312 7169040
TABLE ACCESS FULL DMS_ATTY 137 96255 1540080
TABLE ACCESS FULL DMS_ATTYPHN 309 158612 4599748
TABLE ACCESS FULL DMS_PHN 3043 3284444 62404436
INDEX FAST FULL SCAN DMS_PTYATTY_ID_IDX 17114 11553888 184862208
TABLE ACCESS FULL PHONE 12810 1 33
FILTER
HASH JOIN 9204 159312 10195968
HASH JOIN 884 159312 7169040
TABLE ACCESS FULL DMS_ATTY 137 96255 1540080
TABLE ACCESS FULL DMS_ATTYPHN 309 158612 4599748
TABLE ACCESS FULL DMS_PHN 3043 3284444 62404436
TABLE ACCESS FULL PHONE 12735 1 33
As stated, the big question is, can we avoid the full table scan twice on the DMS_ATTY, DMS_ATTYPHN, and DMS_PHN tables. That was my reason for creating the simple example, based on this larger complex query.
Similar Messages
-
Alternative querying options at BI
Hello all!,
Could you help me giving some information, links, notes, about alternative querying options at BI infoCubes. FYI: I don't want to use Query Designer o Web Application Designer or BEx Analyzer via excel based reports.
Thanks in advance and best regards
BernardoWith BI 7.0 there is an option of native Excel 2007 access.
The SAP Business Objects tools can access BW - Crystal Reports, Web Intelligence, Voyager, and is SAP's future direction, replacing Analyzer and Web Qery Designer.
Other 3rd party tools that should have decent OLAP capabilities.
Actuate http://www.actuate.com/home/index.asp
Cognos http://www.cognos.com/olap.html
MS Analysis Services
ArcPlan http://www.arcplan.com/home.cfm
NovaView (I'd include this one in any evaluation) http://www.panorama.com/ -
In dreamweaver site-wide query option file grayed out
in dreamweaver site-wide query option file grayed out
Why won't this button option work, I cannot get the site-wide query to highlight, please help anyone, thanks.You need to have a defined site in order for DW to correctly work with your files...
http://tv.adobe.com/watch/learn-dreamweaver-cs5/gs01-defining-a-new-site/
Once defined, you will always work from the Dreamweaver Files panel to ensure the program can manage your files correctly. -
ORACLE 8I EXPORT의 QUERY OPTION 기능
제품 : ORACLE SERVER
작성날짜 : 2000-09-19
Oracle 8i EXPORT의 Query Option 기능
====================================
Oracle 8i에서는 export 작업 수행 시 Query Option을 이용하여 테이블의
부분적인 추출이 가능하다.
SQL> select empno, ename, job, sal from emp order by job;
EMPNO ENAME JOB SAL
7788 SCOTT ANALYST 3000
7902 FORD ANALYST 3000
9999 홍길동 ANALYST 2000
7369 SMITH CLERK 800
7876 ADAMS CLERK 1100
7934 MILLER CLERK 1300
7900 JAMES CLERK 950
7566 JONES MANAGER 2975
7782 CLARK MANAGER 2450
7698 BLAKE MANAGER 2850
7839 KING PRESIDENT 5000
7499 ALLEN SALESMAN 1600
7654 MARTIN SALESMAN 1250
7844 TURNER SALESMAN 1500
7521 WARD SALESMAN 1250
위와 같이 구성된 EMP 테이블에서 만일 'MANAGER'로 JOB을 가진 사원중 SAL
컬럼이 2500이상인 레코드를 export하고 싶다면, 다음과 같이 수행하면 된다.
% exp scott/tiger tables=emp query=\"where job=\'MANAGER\' and sal\>=2500\"
Export: Release 8.1.5.0.1 - Production on Tue Sep 19 16:14:15 2000
About to export specified tables via Conventional Path ...
. . exporting table EMP 2 rows
exported
Export terminated successfully without warnings.
한글 컬럼에 대해서도 동일한 where 조건에 지정이 가능하다.
% exp scott/tiger tables=emp query=\"where ename like \'홍%\'\"
V8.1.5 버젼에서 제공되는 Query 옵션의 특징:
1. 테이블 레벨의 export 명령어에서만 가능하다.
2. Direct 옵션과 함께 사용될 수 없다.
3. Nested 테이블을 갖는 테이블에는 적용할 수 없다.
4. Partition 테이블에 대한 export에도 적용가능하다.
5. Import 명령에는 적용되지 않는다.Thanks Guys,
I am still a bit lost though...
It may be simply a matter of me finding Oracle 8i so I can do what I need to do.
Where can I get Orcale 8i from? Does anybody have it? The oracle site only has a version back to 9.2 I queried with a employee from Oracle University here in Australia, and he suggested asking in the forums.
Just so you know what I'm trying to do:
Data Server:
Running Aix with Oracle 7.14... actually could be 7.41 - I'll check today.
This system will not be upgraded to any later version of Orcale, because systems are in place, and core systems at our other sites have to be the same. (my project is a local one)
Web Server:
Running XP profession with IIS and using ASP (active server pages)
Currently running Oracle 10g, and ASP code connects to the local database on this machine via an ODBC connection.
At the moment, I have scripts on the Aix server that dumps data from Oracle 7.x into a .csv file.
Then, I have scripts that copy those csv files to the XP server, and they are imported to the local Oracle 10g database.
To display this data on the website, I use ASP via the odbc connection to query the local database on the XP server.
As said in my previous post, there must be an easier way to do this.
I need a local database on the XP server too, and am thinking the best way is to downgrade to 8i.
Can anybody tell me where I can get 8i to try this out? I have been trying to reasearch this for a while now without luck. Any help would be appreciated, and thanks for those who have replied so far.
-Tom -
Use of QUERY option in 9iRel2 Export utility
Hi All,
Is it possible to use a query option to the export utility of the form below assuming I am exporting a table called test1:
query="(test1.col1,test1/col2) not in (select test2.col1,test2.col2 from test2)"
I am not sure if it is allowed to reference another table in the query clause, test2 in the example above....?
ThanksI don't have a 9iR2 environment with me right now but this works on 10gR2. And I have no reason to believe that it would not work in 9iR2.
SQL> select * from a;
ID
1
2
SQL> select * from b;
ID
2
SQL> $
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>exp sysadm/itbagain@qo810 tables=(A) query='where id not in (select id from b)'
Export: Release 10.2.0.4.0 - Production on Wed Sep 8 14:17:49 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Release 10.2.0.4.0 - Production
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table A 1 rows exported
Export terminated successfully without warnings.
C:\> -
Customization forms display message Query options
Is there any way to eliminate or change the message 'Query Options' in a report customization form?
Query Options will appear in customization form if you have any bind variable set in the component's design time.
If u dont want to have any query options,
you can suppress them by redesigning the component without any bind variables. -
ORACLE V7.1 PARALLEL QUERY OPTION(PQO) TEST
제품 : ORACLE SERVER
작성날짜 : 2004-08-13
SCOPE
8~10g Standard Edition 에서는 지원하지 않습니다.
Subject: Oracle V7.1 PQO 테스트 결과
1.테스트 장비 : Sequent2000-S750
512MB M/M, 16GB H/D, 20 CPUs
2.테스트 S/W : Oracle V7.1.1 Beta (Parallel Query Option)
3.DB file구성 : 10개의 hard disk를 strapping raw device로 구성
data tablespace : 1.9 GB
4.Data Load : 2개의 테이블 사용(5KB , 1MB)
5.테스트 결과.
- Sort Merge Join (Default SQL: using 1 CPU) : 6m21s - 6m33s
* Sort Merge Join (Parallel 20 option: using 20 CPU) : 0m59s
* Parallel index create (1Mega table) : 1m18s - 1m28s
- Nested Loop Join (Default SQL: using 1 CPU) : 1m15s - 1m23s
* Nested Loop Join (Parallel 20 option: using 20 CPU) : 0m02s - 0m03s
- Execute PL/SQL procedure (Default SQL: using 1 CPU) : 1m54s
(embeded compiled PL/SQL procedure : user define function)
* Execute PL/SQL procedure (Parallel option : 20 CPU) : 0m13s
(embeded compiled PL/SQL procedure : user define function)
결과적으로 SQL문의 종류에 따라 7배 - 40배 정도의 성능 향상을 보여줌.
6. 본사에서 recommand한 자료에 의하면 18배 이상의 성능 향상 을 얘기하는데
이결과는 테스트 장비 구성의 차이라고 할 수 있습니다.
본사 테스트 장비 : Sequent5000 model, 1GB M/M, Pentium CPU, 20 H/Ds
cab로서 장비 구성요소 만으로도 2.5배 이상의 성능의 효과가 기대되는 상황.Can you try running the following query and see if parallelism is used. I have used table alias "a" and included that in the parallel hint
select /*+ parallel(a, 8) */
colA,
colB
from abc.mytable a
where my_date between to_date('01/01/2011','mm/dd/yyyy') and to_date('12/31/2011','mm/dd/yyyy') AND
CD = '35';
Thanks -
EXPORT 시 QUERY OPTION에 대한 사용 예(ORACLE 8I 이상)
제품 : ORACLE SERVER
작성날짜 : 2004-03-17
EXPORT 시 QUERY OPTION에 대한 사용 예(ORACLE 8I 이상)
============================================
PURPOSE
============
oracle 8i에서 export 시 query option에 대한 사용 예
8i에서 export의 query syntax 를 이용하여 table data의 한 부분만 exporting 이 가능
- 8i 에서 select 문장의 where 절을 사용하는 것처럼 export 시에 부분적으로 table data 를 받아 낼수 있는 기능을 소개 한다.
- Direct 옵션은 사용될 수 없다..
- where 절에 해당하는 export utility는 query parameter 를 사용한다.
UNIX syntax:
- Example:
1.SCOTT.Emp table의 ename 이 JAME과 비슷한 이름의 data 를 export ..
exp scott/tiger query=\"where ename like \'JAME%\'\" tables=emp file=exp.dmp log=exp.log
2. employee와 cust table에서 new york 주의 data 만 export ..
exp scott/tiger query=\"where st=\'NY\'\" tables=(employee,cust) file=exp.dmp log=exp.log
query 문장에서 UNIX reserved characters( ", ', ,< .. 등) 를 사용하는 경우에는 escape ('\') 을 반드시 사용해야 한다.
예)query=\"where JOB = \'SALESMAN\' and salary \< 1600\"
더 중요한 것은 command line에서 export option을 사용할때는 반드시 escape 이 있어야 하나
parfile을 사용할때는 eacape이 불필요하다.
예를 보면 .. p라는 이름의 file을 다음과 같이 생성
tables=emp query="where job='SALESMAN'"
parfile을 이용해서 export 를 실행해 보면
[rmtdchp6]/apac/rdbms/64bit/app/oracle/product/9.2.0> exp scott/tiger parfile=p
Export: Release 9.2.0.4.0 - Production on Wed Mar 17 00:12:34 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses KO16KSC5601 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 4 rows exported
와 같이 정상 처리 됨을 알수 있다.
만일 command line에서 위의 내용을 실행하게 되면 다음과 같이 error 를 만난다.
exp scott/tiger tables=emp query="where job='SALESMAN'"
LRM-00101: unknown parameter name 'job'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
command line에는 query 내에 single(')나 double quotes(") 를 사용한다면 반드시 double quotes(") 를 사용하여
query 문을 묶어야 한다.그러나 query 내에서 single ('')나 double quotes(") 를 사용하지 않는다면 single quotes (')을 사용하여
query 문을 수행할 수도 있다..
다음 예를 보면..
1>exp scott/tiger tables=emp query=\'where deptno=20\'
Export: Release 9.2.0.4.0 - Production on Wed Mar 17 00:22:00 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses KO16KSC5601 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 4 rows exported
2>exp scott/tiger tables=emp query=\'where job=\'SALESMAN\'\'
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
즉.. 정리를 하자면
command line에서 query 내에 '," 을사용하지 않는 다면 '나 " 으로 query option을 사용할수 있다
query=\'where deptno = 20\'
query=\"where deptno = 20\"
query=\'where deptno \< 2\'
(이 경우 single 이나 double quotes 을 둘다 사용할수 있다.)
parfile을 사용하는 경우에는 다음과 같이 단순하게 사용이 가능하다.
query='where deptno = 20'
query="where deptno = 20"
query='where deptno < 20'
WINDOWS NT / 2000 와 NETWARE syntax:
다음의 자료를 참조바란다.
Example:
EXP demo/demo tables=emp file=exp1.dmp query="""where deptno>30"""
double quotes(") 를 둘러 싸는 경우에는 space 가있으면 안된다.
parfile의 사용은 다음과 같이 하시면 됩니다.
file=exp66.dmp
query="where deptno > 20"
tables=(emp)
log=log66.txt
userid=scott/tiger
Explanation
Windows NT or Win2000의 경우 command line에서는 3 double quotes 이 필요하고
'PARFILE 을 사용하는 경우에는 double quotes(") 한번만 필요함
Reference Documents
Oracle8i Utilities guide
Note:91864.1 -
[Helix 2nd gen] Alternative stylus options
Hi all,
Loving my Helix 2nd gen so far. Not happy with the palm rejection (only starts when very close; would love to double the range). But I guess I will just create a toggle button that deactivates the touch screen through the registry.
Anyway, my question: Are there any alternative stylus options for the Helix 2nd gen? I found an older thread indicating that "penabled" Wacom styli(?) work, but I don't think this attribute is displayed on any of their current products.
Any styli you can recommend for the current Helix? (Maybe even one that extends the palm rejection distance?)
Thanks for your advice!
MoritzI just tested the Stylus of the Lenovo X230T and it works without issues. Guess I have to calibrate it though. The thing I do not like with the Stylus of the Helix 2nd is that the click button is plan to the stylus. So it is allways hard to find and press if you have some bigger fingers.
So - any other Lenovo Wacom Stylus should run, I guess. -
Hi Experts,
I am using GBI to consume data from a BOPF BO via OData. For some special cases I need the query options $top, $skip and $inlinecount.
But it seems that these query options are not supported until now (I have Component SAP_BS_FND 747 SP04 installed).
Is that true? If yes, is it planned to support the query options in an upcoming version.
Thx for your help.
FlorianHello Florian,
I cannot speak for GBI and I hope that someone else will have an answer for you. Still I hope that the following might help:
As you are requesting for $top and $skip I guess(?) you have a read-only UI for a large number of entries. If this is the case, upcoming versions might offer a solution for you with SADL-based gateway services. Please refer to this post.
Kind Regards,
Ivo -
Problem with odata with custom query options
I have a datasource which uses custom query options
http://www.odata.org/documentation/odata-version-3-0/url-conventions/#url5.2
But those query options are not getting sent by Power Query with the $top requests. Hopefully this is something you will correct in a subsequent release.
- ChrisHere's the sequence of calls that Power Query makes:
GET /odata/catalog/test?$orderby=name¶m=70442
GET /odata/catalog/$metadata
GET /odata/catalog/test?$orderby=name&$top=1000
GET /odata/catalog/test?$orderby=name¶m=70442
GET /odata/catalog/$metadata
GET /odata/catalog/test?$orderby=name
GET /odata/catalog/test?$orderby=name¶m=70442
The problem, as you can see, is that two of the calls did not include the "param" parameter which is resulting in incorrect behaviour. Is this a bug?
Thanks,
Chris -
SSMS not saving Query Options between sessions
When I run a SQL query I always want to
1. Include column headers when copying or saving the results
2. Display results in a separate tab
3. Switch to results tab after the query executes
So, I set these Query Options and click OK, but the next time I open SSMS it does not remember my previous choices...which makes me have to go in and set them FOR EVERY QUERY WINDOW? Is there a way to get SSMS to save my choices??
Thanks in advance for your help!I believe the issue is that he is using these options and setting them but once he restarts, those settings are getting lost. I mentioned the registry key where these options are saved because it might be a permission issue (HKEY_CURRENT_USER\Software\Microsoft\SQL
Server Management Studio\XX_CONFIG)
Satish Kartan http://www.sqlfood.com/ -
Hi all,
OData supports query options like $filter=cityfrom eq 'SINGAPORE' or $select=...
(A full list can be found [here|http://www.odata.org/media/16352/%5Bms-odata%5D.pdf])
1) Which options are supported by Gateway?
2) What is the "Gateway Solution" to filter the result of the GetList/Query command for a specific entity?
(e.g. return all flights with city of departure equal to 'Singapore')
Best Regards,
FlorianHi Ron Sargeant
Problem is when i apply filter and data has a Slash ("\") for e.g company\ali.naveed
its give me error.
http://192.168.59.229:8080/gateway/odata/sap/EmployeeDataList;v=1/Employee?$filter= DomainAndUsername eq 'company\ali.naveed'
if i query without Slash ("\") for example in email its working.
/Employee?$filter= Email eq '[email protected]'
what is process to fetch data which contain a slash("\")?
Regard
Ali -
Help with export with query option
I need help with an export with query option.
I have a script that includes the following
auddate=`date '+20%y%m%d'`
file="cal_shrlgpa"$auddate".dmp"
exp / file=$file tables=shrlgpa query\=" where shrlgpa_pidm in (Select sztahbr_pidm from purdue.sztahbr where sztahbr_to_extract\=\'Y\' and sztahbr_export_status\=\'N\')\"
echo 'cal export file created:'$file
when I run the script, I get the following error:
cal_export_tables.sh[7]: 0403-057 Syntax error at line 7 : `"' is not matched.
Can somone help me with the query option?I made the suggested change:
exp / file=$file tables=shrlgpa query=" where shrlgpa_pidm in (Select sztahbr_pidm from purdue.sztahbr where sztahbr_to_extract=\'Y\' and sztahbr_export_status=\'N\')"
and got the following error:
LRM-00116: syntax error at 'sztahbr_to_extra' following 'where'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
Shannon -
Exp & Query option causing EXP-00056 ORA-00904
Experts,
Database Version: 9.2.0.4.0
I'm trying to export with using query option, But having below errors.
Any suggestions Please.
exp system/***** tables=ORDERS_TN file=ORDERS_TN.dmp log=ORDERS_TN.log query=\" WHERE ORDERS_ID IN \('A1','A201','A3'\) \"
Export: Release 9.2.0.4.0 - Production on Wed Feb 1 21:42:02 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table ORDERS_TN
EXP-00056: ORACLE error 904 encountered
ORA-00904: "A3": invalid identifier
Export terminated successfully with warnings.Thanks.Hello,
The preferred way to use the query option is to use it in the parfile, because the query option may have special characters within its values which need to be escaped and every OS has its own way of escaping those characters. So in order to make it portable and easy, create a file parfile and use that in the export command.
For example create a file myval.txt and put following query in it:
query="WHERE ORDERS_ID IN ('A1','A201','A3')"
and then use export command as:
exp system/***** tables=ORDERS_TN file=ORDERS_TN.dmp log=ORDERS_TN.log parfile=myval.txt
regards
Fahd
Maybe you are looking for
-
1st gen iPod Touch with iOS 3.1.3 - update via wi-fi?
That's basically it. I found my old 1st gen iPod Touch and wanted to update the iOS, but I am away from my computer with iTunes. I do have wi-fi though. I tried via Settings->General->Update. But it doesn't have an update option in settings. Anyon
-
Crystal Report - Parameter issue (advanced dialog box)
In our wpf .net application we view the crystal report, the report prompts for entering 2 parameter values i.e 2 dates and inturn these parameters will be used to generate the crystal report. The parameter panel on the left has a button (show advance
-
Ljava/lang/String Error
Hi, all I am developing a simple "Hello World" example in Java RMI. But it turns out with this error: Exception in thread "main" java.lang.AbstractMethodError: Server_Stub.getMessage()Ljava/lang/String; at Client.main(Client.java:105) Any Help? Thank
-
my 160 GB classic ipod. Whenever I connect my ipod to my windows vista itunes freezes. Sometimes it pops up in the itunes window then tries to sync but shortly after trying it freezes.and when i disconnected the ipod it needs to get restored I believ
-
The Maps Error after update software
Before update software, maps run normally, after upsate software maps error 1013. How fix this error??? @_#*?"';:£ very bad update