submit sparql using sqlplus
I need to run a sparql query using sqlplus. I had something real simple works very much like:Select s, table type (sem_match ('(? s RDF: type? type)', sem_models ('cnodb'), null, null, null))
However, I get errors when the sparql is a little more complex like this:
Select subj, rel, table obj (sem_match ('(? s rdf:object?. obj? s subject? subj.? s element? rel)', sem_models ('cnodb'), null, null, null))
ERROR on line 1:
ORA-29532: Java completed by eception Java exception appeal:
oracle.spatial.rdf.server.ParseException: encountered '. ' in line 1, column 21.
Expected:
")" ...
ORA-06512: at the 'MDSYS. RDF_MATCH_IMPL_T', line 203
ORA-06512: at the 'MDSYS. RDF_MATCH_IMPL_T', line 67
ORA-06512: at line 4 level
Does anyone know the proper syntax to submit this sparql? Thank you.
Russ
Hello
Two types of syntax are supported: bracket (1) and (2) the brace.
Your query with parenthesis syntax would be:
Select subj, rel, table obj (sem_match ('(? s rdf:object? obj) (? s subject? subj) (? s element? rel)', sem_models ('cnodb'), null, null, null))
With the curly brace syntax, it would be:
Select subj, rel, table obj (sem_match ('{? s rdf:object?. obj? s subject? subj.? s element? rel} ", sem_models ('cnodb'), null, null, null"))
UNION and key words FILTER are only supported in the brace syntax. You can see the documentation describing the SEM_MATCH for more information: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11828/sdo_rdf_concepts.htm#CHDJACII
I hope this helps.
Tags: Database
Similar Questions
-
Not able to connect to the database using SQLPLUS.
Hello
in the connection to the oracle in linux machine using sqlplus utility database I got following error.
does anyone have an idea about this error?
[oracle@LOM-NEYTR-RHEL-NEW1 dbhome_1] $ sqlplus
SQL * more: Production of release 11.2.0.1.0 game may 15 10:22:50 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter the user name:
Enter the password:
ERROR:
ORA-00604: an error has occurred at the SQL level 1 recursive
ORA-01653: unable to extend the table SYS. AUD$ 8 in the SYSTEM tablespace
ORA-02002: error writing to the audit trail
ORA-00604: an error has occurred at the SQL level 1 recursive
ORA-01653: unable to extend the table SYS. AUD$ 8 in the SYSTEM tablespace
7144389e-3944-4D5C-830e-46539d2d9971 wrote:
I found the temporary solution. You can go through the following link where I got the idea.
So has what "temporary" solution applied?
And especially, what is the permanent solution will you.
The most common solution, which goes back at least to when I started with v7.3, is to move the aud$ table out of the SYSTEM tables. And with 11g, there is even a new package for the management of the audit trail, including a method for moving the table. See DBMS_AUDIT_MGMT
-
How to get code written for perticular purpose of database using sqlplus?
Hello
I'm trying to get the syntax written for the purpose of perticular (view/Table) database using sqlplus.
Can someone help me on this please.
Thanks in advance,
NISH
I'm trying to get the syntax written for the purpose of perticular (view/Table) database using sqlplus.
Can someone help me on this please.
Use the DBMS_METADATA package:
Select dbms_metadata.get_ddl ('TABLE', 'EMP', 'SCOTT') of double
Select dbms_metadata.get_ddl ('DISPLAY', 'V_EMP', 'SCOTT') of double
-
Update CM name of node using sqlplus
Hi all
Please notify
EBS r12 12.1.3 on oul5 x 64
After the clone system is in place, I have to connect to simultaneous OAM-> Manager-> set and change the name of the node from the old to the new node name.
Question: would like to update using sqlplus directly to some table that store the node name and the name of the target node.
I saw the tables FND_CONCURRENT_QUEUE_VL AND FND_CONCURRENT_QUEUE, but it doesn't look right.
Advise please.
Thanks in advance.
Kind regardsuser3715462 wrote:
Hi allPlease notify
EBS r12 12.1.3 on oul5 x 64
After the clone system is in place, I connect simultaneous OAM--> manager--> set and change the name of the node from the old to the new node name.
Question: would like to update using sqlplus directly to some table that store the node name and the name of the target node.
I saw the tables FND_CONCURRENT_QUEUE_VL AND FND_CONCURRENT_QUEUE, but it doesn't look right.
Advise please.
Thanks in advance.
Kind regardsEven if the direct update is not recommended, I usually update APPLSYS. FND_CONCURRENT_QUEUES (NODE_NAME, NODE_NAME and TARGET_NODE columns) on my case ONLY cloned with no problem - http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_CONCURRENT_QUEUES&c_owner=APPLSYS&c_type=TABLE
Make sure that you run the cmclean.sql script once you upgrade the CMs with the correct server name - concurrent processing - CMCLEAN. SQL - Script Non-destructive to clean the simultaneous Tables Manager [ID 134007.1]
Thank you
Hussein -
How to use sqlplus to connect and run control?
Hello, I have a little problem please help me
I want to use sqlplus to connect and run the command
for example: sqlplus test/test@DB select sysdate double;
and then it will show on the screen (sysdate) data
What should I do?
Thank youWrong tool. You should start with something like this:
#! usr w
use strict;
Use DBI;SQL * more isn't a script tool.
-
I'm trying to set the mode of maintenance by using the adsetmmd.sql script, but its not allowing me to run
appldev@appl11:/u09/dev/appl/ad/11.5.0/patch/115/SQL >; sqlplus apps/[email protected] ENABLE
Use: SQLPLUS [< option >] [< user > [< password >] [@ < host >]]
[@ < startfile > [< parm1 >] [< parm2 >]...]
where < option >: = {s-|-?}
s for silent mode and -? to get the version number
its 11i
DB: 10.2.0.4
Please let me know where I am going wrong.Hello
Finally, I'm able to put MMD using sqlplus, it is and must be the space after apps/apps
Yes, and that's what I have mentioned above two times :)
Thank you
Hussein -
startup using sqlplus use spfile
I am facing a strange problem. I don't know if this is normal behavior in the CCR or not.
When I start the database using srvctl, it always uses the spfile shared, which is located in the commune of ASM diskgroup.
Then, when I start the database using sqlplus, always look in the directory of $ORACLE_HOME/dbs and mount init < SID > .ora file (there is no spfile does exist in this directory). So I can't change settings dynamically. Could someone explain to me why is it so?.Hello Silva,
Certainly, oracle research parameter file in $ORACLE_HOME/dbs by default in the RAC environment, this is a normal behavior of the CARS. As for your explanation, I can confirm that you do not haveinit .ora file in $ORACLE_HOME/dbs. In your case, srvctl research pfile in local ORACLE_HOME, who will point to the location of each file the node pfile-spfile. I'll show you an example to clarify:
Let's say you have 3 node RAC (NŒUD: ud1, Node2, Node3)
and get the name myservice Service (Instance: myservice1, myservice2, myservice3) respectively.
You have shared spfile(i.e. spfilemyservice.ora) ASM diskgroup that is accessible from each node.
In this case you supposed to create pfile (i.e. init> .ora) in $ORACLE_HOME/dbs in each node
and place the container as shown below:
SPFILE ='> / spfilemyservice.ora' Example:
Node1:
make a file $ORACLE_HOME/dbs/initmyservice1.ora and have SPFILE ='> / spfilemyservice.ora' as its content.
Node2:
make a file $ORACLE_HOME/dbs/initmyservice2.ora and have SPFILE ='> / spfilemyservice.ora' as its content.
Node3:
make a file $ORACLE_HOME/dbs/initmyservice3.ora and have SPFILE ='> / spfilemyservice.ora' as its content. Now, bounce back you, data and services and try to start the database, then it will use spfile as you expected.
Thank you
SureshGPublished by: Suresh Gautam on November 24, 2009 21:13
-
How to change a procedure using sqlplus...
command to change a procedure using sqlplusHello
Laughing says:
command to change a procedure using sqlplusYou cannot change a procedure in the way that you can, say, ALTER TABLE; all you can do is CREATE OR REPLACE PROCEDURE..., with the definition of the whole procedure.
Do the actual editing in a text editor. Any editor will do. You can even use a word processor, if you think to save it as text only.
If you don't have a copy of the procedure as it is, and then use dbms_metadata, or query a view of data as all_source dictionary to get a.
In SQL * Plus, run the file that you have edited by saying:
SQL> @pathname\filename
-
Procedure script using sqlplus.
Hello group,
I use Toad to load a script package. But just in case how can I get the script packages or a table using sqlplus el.
Thank you.SQL > Set long =< to="" some="" higher="" value=""> > ...
SQL > select the text in dba_source where...
Oops... I don't know what you need...
Published by: sagechristelle on October 1st, 2008 16:41
-
Question: Using Sqlplus to create a report
Hi masters Sqlplus,
I have the same question as the old thread calculate from the number
COIL D:\TEST. TXT
BREAK ON COL1 ON REPORT
CALCULATION NUMBER OF COL1 NODUP REPORT
CALCULATION NUMBER OF COL2 ON REPORT
with the data as
(
Select 'AAA' COL1, COL2 '1111' from dual
Union of all the
Select 'AAA' COL1, COL2 '2222' from dual
Union of all the
Select 'AAA' COL1, COL2 '3333' from dual
Union of all the
Select 'AAA' COL1, COL2 '4444' from dual
Union of all the
Select 'AAA' COL1, COL2 '5555' from dual
Union of all the
Select 'BBB' COL1, COL2 '1111' from dual
Union of all the
Select 'BBB' COL1, COL2 '2222' from dual
Union of all the
Select 'BBB' COL1, COL2 '3333' from dual
Union of all the
Select 'BBB' COL1, COL2 '4444' from dual
Union of all the
Select 'BBB' COL1, COL2 '5555' from dual
Union of all the
Select 'BBB' COL1, COL2 '6666' from dual
Union of all the
Select 'BBB' COL1, COL2 '7777' from dual
Union of all the
Select 'BBB' COL1, COL2 '8888' from dual
Union of all the
Select 'BBB' COL1, COL2 '9999' from dual
Union of all the
Select "CCC" COL1, COL2 '1111' from dual
Union of all the
Select "CCC" COL1, COL2 '2222' from dual
Union of all the
Select "CCC" COL1, COL2 '3333' from dual
Union of all the
Select "CCC" COL1, COL2 '4444' from dual
Union of all the
Select "CCC" COL1, COL2 '5555' from dual
)
Select * from data;
SPOOL OFF
ED D:\TEST. TXT
The result is like that.
COL COL2 --- ---- AAA 1111 2222 3333 4444 5555 BBB 1111 2222 3333 4444 5555 6666 7777 8888 9999 CCC 1111 2222 3333 4444 5555 --- ---- 19 19 19 rows selected.
How to get the count (col1) = 3, no 19?
For now, I can't use grouping to customize the result, because I have to give the secondary account for each col1 and the short dash line.
Please give me advice.
Phil
Post edited by: Phil in Sydney
The end result is the sequel.
COL COL2 --- ---- AAA 1111 2222 3333 4444 5555 BBB 1111 2222 3333 4444 5555 6666 7777 8888 9999 CCC 1111 2222 3333 4444 5555 --- ---- 3 19 19 rows selected.
Hi, Phil,
Here's a way to change the query:
WITH hide_col1 AS
(
SELECT col1 AS original_col1
col2
ROW_NUMBER () OVER (PARTITION BY col1
ORDER BY col2
) AS r_num
FROM the data
)
SELECT THE CHECK BOX
WHEN r_num = 1
THEN original_col1
END AS col1
col2
OF hide_col1
ORDER BY original_col1
r_num
;
All SQL * most orders can stay as they are.
-
Not able to connect using sqlplus username/password@dbname
Hello
I am new to Oracle, upon request to help me solve this problem.
I am trying to connect to the database using the schema name and the password as:
sqlplus username/password@dbname
But it gives me the following error:
ERROR:
ORA-01017: name of user and password invalid. connection refused
But I'm able to connect with the same username and password when I just spent like:
$sqlplus
Enter the user name: user name
Enter the password: password
SQL >
I checked the tnsnames.ora and sqlnet.ora file and the values inside these files are perfect.
I have only a single database on this computer.
Machine OS: linux
Please help me is to resolve this.
Thank you
-Rajiv
mferrera wrote:
Stevens thank you for your quick response...
The ORACLE_SID is worth of database to which I want to connect to... and like I said, I have only a single database on this computer... so no question to connect to other databases...
Yes, there is a question to connect to a different database. Oracle is too dumb to lie down, particularly on your reported error message. You provide is not exactly the same credentials or your connection remotely ("@dbname") points to a different database. Note that when you use this syntax, 'database_name' is not the name of the database, but rather the name of an entry in tnsnames.ora. This entry specifies the target host and port, as well as the name of the service (database).
Use copy and paste from a command line session to show us the full order and full power of 'tnsping database_name. "
where 'database_name' are any real value you used when you received the error.
-
Form Acrobat automatically submit without using Outlook?
We are using Acrobat 9 Professional, Office Standard 2007, Windows XP, and some PC have Windows 7
We created an Acrobat form with a submit button. Everything works as expected - thank God. We are able to fill out the form, the submit button then runs a java script that creates an Outlook email, fills the header of e-mail in the subject field, text in the body of the message and adds the filled PDF as an attachment.
Now, we are interested in the elimination of the last step: send e-mail to prospects. Anyway to get Outlook to automatically send the email without end-user intervention?
Thanks in advance for any suggestions.
Allison
With splashes of PHP is not difficult at all - see my segment in AUCTV:
http://TV.Adobe.com/watch/Acrobat-Community-TV/working-with-form-data/
Test screen name says:
Presentation should be a program on a web server, like all web sites. A web programmer is required to create this script, so it is a process much more complex that we want so be it. We thank spammers for that.
-
Weird RPAD translates 11g using SQLPLUS
OK, I have two different versions of Oracle.
My 10g database...
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
I have run in SQLPLUS SQL
And I get the following resutls...SELECT RPAD(FIRST, 20), RPAD(LAST, 20) FROM ( SELECT 'James' FIRST, 'Brown' LAST FROM dual UNION SELECT 'Christopher' FIRST, 'Columbus' LAST FROM dual )
But if I do the same things on my database 11g...RPAD(FIRST,20) RPAD(LAST,20) -------------------- -------------------- Christopher Columbus James Brown 2 rows selected.
Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
I get...
Why is it formatted oddly, and how can I solve this problem?RPAD(FIRST,20) -------------------------------------------------------------------------------- RPAD(LAST,20) -------------------------------------------------------------------------------- Christopher Columbus James Brown 2 rows selected.
Published by: selectsplat on July 7, 2010 07:42TRUE is the default and recommended value setting cursor_sharing
http://download.Oracle.com/docs/CD/E11882_01/server.112/e10820/initparams041.htm#REFRN10025
It must only be on another value to fix a buggy application that does not use bind variables, preference only at the level of the session for the broken application connections.
You will need to discuss with your DBA to find why they put a default value and why they apparently did the scale of the entire base of the system.
-
Can I use SqlPlus in Oracle11GR1 traditional development environment?
Hello
I downloaded Oracle 11 GR 1 material, but I want to write the sql code in the SqlPlus tradition environment which was in Oracle 9i or 8i (who had a history of white color). So how to get this here SqlPlus development environment? The current download and installation SqlDeveloper was installed and sqlplus command prompt has been provided. But I want to use this environment to sqlplus white screen. Please guide how to get that one.
Thank you.First create a shortcut icon on your desktop to sqlplus.exe (in your oracle_home/bin directory).
Then right-click on the icon and select Properties. Change these settings:
Tab: General Put the instance name in the text box Tab: Shortcut Target: (your oracle_home)\bin\sqlplus.exe userid/password@databasename --< use with caution Start in: (your oracle_home)\bin Run: Normal Window Change icon to whatever you want Tab: Options Cursor size: Small Command History, Buffer size: 50 , Number of buffers: 4 Display options: Window Edit Options: check QuickEdit mode check Insert mode Tab: Font Size: 8x12 Font: Raster Fonts Tab: Layout (Screen Buffer Size is the 'virtual' size of the screen Window Size is what you see on the screen having a buffer size of 2000 allows sql plus to display very wide rows when sql plus LINESIZE is also 2000) Screen buffer size: Width: 2000 Height: 2000 Window size: Width: 125 Height: 55 check Let system position window Tab: Colors I like aqua on black, but whatever Tab: Compatibility Leave all these unchecked
I like to include my user name and password in the determination of objectives, but this can be a security risk, so use with caution.
And some of these parameters depend on the size of your monitor, your Visual acuity, etc so adjust to taste.
Then, edit your glogin.sql file (it is in oracle_home/sqlplus/admin) and add these lines:
SET serveroutput on SET linesize 2000 SET pagesize 50000 SET trimspool on SET long 50000 SET tab off ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
You can use any format you like for the date format, but make sure that it includes the portion of time.
This is also where you put the PASS command to change the column you mentioned.
Something like: COL some_column to 999999I also have this query in my glogin.sql:
SELECT d.name, s.sid,s.serial#, p.spid FROM v$process p ,v$session s ,v$database d WHERE p.addr = s.paddr AND s.audsid = userenv('SESSIONID');
This info can be useful for some data dictionary queries (such as v$ session_longops).
Then create a directory somewhere to organize all your scripts SQL more than of assistance. As c:\oraclescripts.
Create a permanent environment variable called SQLPATH pointing to this directory.
Every time that you run a script from the sqlplus prompt, it will search this directory if you do not have to call every time.
Now, double-click the icon and try it.
-
How to print the name of the .sql file in the same file using sqlplus
Oracle 10g on Linux platform.
I am trying to print the name of the .sql script file in this file, but could not. Here is the file:
test. SQL
But instead of print, it is asked for the entry:select '&0' from dual;
Can any body give me a clue as how can I print the name of the file.SQL> @test.sql Enter value for 0:
A quick Google search and I found this...
http://blog.tanelpoder.com/2007/12/26/sqlplus-is-my-second-home-part-5-reading-the-name-of-currently-executing-script/
Content of a1.sql
appinfo set to
Select sys_context (' USERENV', 'MODULE' ') of double;He'll be back...
SQL > @a1SYS_CONTEXT ('USERENV', 'MODULE')
-------------------------------
01 @ a1.sqlJames.
Maybe you are looking for
-
I tried several times to access the functionality Apple pay on my iPhone 6 s. Whenever I try to add my card it warns me that it "cannot add Card '. I'd appreciate a lot any idea on this. Thank you!
-
Why can I not see my gmail mailboxes in mail in El Capitan?
I do not see my gmail mailboxes in mail
-
phone bill with SPA3102 fraud.
Hello I have a question if it is known to abuse with the Linksys SPA3102? My parents got a phone more of 700 euro Bill to call a foreign number on their PSTN line. They claim to have it never dailed number and I don't know either why should call this
-
How the PSEDB can be edited?
Hellofor many years, I use PSE. In the meantime, the number of my photos, organized by PES, add up to nearly 100,000 images. They are stores on a NAS. Due to a change in the breast of my home network, the necessary device are assigned a new IP addres
-
run the error when go to the "home" button after loading external swf
I work to develop an Android app to learn Arabic, it's very simple.to explain the alphabet, I create and load files SWF external, first and second Chargers work well (loading and when click the buttons there is not any question)but the third charger