I am trying to parse a string using SQL but am too new and still learning. I have text in a control or field 685 that is variable, but always the same format.
field 685 input
Desired output
Basically, the # after the [hg19] but before the q (could also be a p) and the #'s in the () without the commas.
My attempt (though I'm not confident in it at all)
Hi!
I've a text file programme1.out :
CONNECT TO ORACLE (&CONXORA);
CREATE TABLE TABLE1 AS
SELECT ID_PERS
FROM CONNECTION TO ORACLE
(
SELECT DISTINCT PERS.ID_PERS
FROM TAB_GRP GRP , TAB_PERS PERS
WHERE DATE_DEB_GRP <=... (0 Replies)
Hi guys,
I am new on here, I have a function in oracle that returns a specific value:
create or replace
PACKAGE BODY "CTC_ASDGET_SCHED" AS
FUNCTION FN_ASDSCHEDULE_GET
RETURN VARCHAR2
AS
BEGIN
DECLARE
ASDSchedule varchar2(6);
ASDComplete... (1 Reply)
Hi!
I would like to do a single connection to sqlplus and execute some querys.
Actually I do for every query one connection to database
i.e
echo 'select STATUS from v$instance;
exit' > $SQL_FILE
sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT
echo 'select VERSION from v$instance;... (6 Replies)
Hi Experts:
I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
Hi everyone,
another question while using sed.
my sed statement should parse every line in a file and store all "i" variable item a a new file.
any wrong arguments here?
Thanks a million.
task_name => name,
object_type => 'TABLE',
attr1 => 'TestR3',
attr2 => '$i',
for i... (4 Replies)
Hello all, I tried searching for something similiar before posting but couldn't come up with anything that fit what I need.
In Linux, I'm trying to parse through a number of files and take the info in them and put it into mysql. My file is a dump from an expect script:
---filename... (3 Replies)
Hi Forum.
Need your expertise on the following question.
I have the following file which I would like to parse, find first block of SELECT statment and concatenate all input fields as 1 field (~ delimited):
Old File:
SELECT /*+ USE_HASH(CCOMM ICAR IMAP IAS IP IMAS IMPS IAP SPCA) */
... (5 Replies)
Hello,
I have a Pro*C program which contains SQL sentences, such as:
....
Pro*C sentences
....
/*SQL 1*/
EXEC SQL SELECT t1.field1, t1.field2
INTO :w_field
FROM TABLE1 t1, TABLE1 t2
WHERE t1.field1 = t2.field1
AND t1.ID = :wl_id;
....
Pro*C sentences
....
/*SQL 1*/
EXEC... (11 Replies)
Hello All,
I have a requirement in which i will be given a sql query as input in a file with dynamic number of columns. For example some times i will get 5 columns, some times 8 columns etc up to 20 columns.
So my requirement is to generate a output query which will have 20 columns all the... (7 Replies)
Hi All,
I want to run multiple sql queries and store the data in variable but i want to use sql command only once. Is there a way without running sql command twice and storing.Please advise.
Eg :
Select 'Query 1 output' from dual;
Select 'Query 2 output' from dual;
I want to... (3 Replies)
Discussion started by: Rokkesh
3 Replies
LEARN ABOUT DEBIAN
sql::translator::parser::sqlite
SQL::Translator::Parser::SQLite(3pm) User Contributed Perl Documentation SQL::Translator::Parser::SQLite(3pm)NAME
SQL::Translator::Parser::SQLite - parser for SQLite
SYNOPSIS
use SQL::Translator;
use SQL::Translator::Parser::SQLite;
my $translator = SQL::Translator->new;
$translator->parser("SQL::Translator::Parser::SQLite");
DESCRIPTION
This is a grammar for parsing CREATE statements for SQLite as described here:
http://www.sqlite.org/lang.html
CREATE INDEX
sql-statement ::=
CREATE [TEMP | TEMPORARY] [UNIQUE] INDEX index-name
ON [database-name .] table-name ( column-name [, column-name]* )
[ ON CONFLICT conflict-algorithm ]
column-name ::=
name [ ASC | DESC ]
CREATE TABLE
sql-command ::=
CREATE [TEMP | TEMPORARY] TABLE table-name (
column-def [, column-def]*
[, constraint]*
)
sql-command ::=
CREATE [TEMP | TEMPORARY] TABLE table-name AS select-statement
column-def ::=
name [type] [[CONSTRAINT name] column-constraint]*
type ::=
typename |
typename ( number ) |
typename ( number , number )
column-constraint ::=
NOT NULL [ conflict-clause ] |
PRIMARY KEY [sort-order] [ conflict-clause ] |
UNIQUE [ conflict-clause ] |
CHECK ( expr ) [ conflict-clause ] |
DEFAULT value
constraint ::=
PRIMARY KEY ( name [, name]* ) [ conflict-clause ]|
UNIQUE ( name [, name]* ) [ conflict-clause ] |
CHECK ( expr ) [ conflict-clause ]
conflict-clause ::=
ON CONFLICT conflict-algorithm
CREATE TRIGGER
sql-statement ::=
CREATE [TEMP | TEMPORARY] TRIGGER trigger-name [ BEFORE | AFTER ]
database-event ON [database-name .] table-name
trigger-action
sql-statement ::=
CREATE [TEMP | TEMPORARY] TRIGGER trigger-name INSTEAD OF
database-event ON [database-name .] view-name
trigger-action
database-event ::=
DELETE |
INSERT |
UPDATE |
UPDATE OF column-list
trigger-action ::=
[ FOR EACH ROW | FOR EACH STATEMENT ] [ WHEN expression ]
BEGIN
trigger-step ; [ trigger-step ; ]*
END
trigger-step ::=
update-statement | insert-statement |
delete-statement | select-statement
CREATE VIEW
sql-command ::=
CREATE [TEMP | TEMPORARY] VIEW view-name AS select-statement
ON CONFLICT clause
conflict-clause ::=
ON CONFLICT conflict-algorithm
conflict-algorithm ::=
ROLLBACK | ABORT | FAIL | IGNORE | REPLACE
expression
expr ::=
expr binary-op expr |
expr like-op expr |
unary-op expr |
( expr ) |
column-name |
table-name . column-name |
database-name . table-name . column-name |
literal-value |
function-name ( expr-list | * ) |
expr (+) |
expr ISNULL |
expr NOTNULL |
expr [NOT] BETWEEN expr AND expr |
expr [NOT] IN ( value-list ) |
expr [NOT] IN ( select-statement ) |
( select-statement ) |
CASE [expr] ( WHEN expr THEN expr )+ [ELSE expr] END
like-op::=
LIKE | GLOB | NOT LIKE | NOT GLOB
AUTHOR
Ken Youens-Clark <kclark@cpan.org>.
SEE ALSO perl(1), Parse::RecDescent, SQL::Translator::Schema.
perl v5.14.2 2012-01-18 SQL::Translator::Parser::SQLite(3pm)