It's a bit difficult to remove chars from a line already printed, so I'd propose to do the whole thing in one single line. Would this do? ---------- Post updated at 19:01 ---------- Previous update was at 19:00 ----------
I think SQL does accept one line UPDATE statements, doesn't it?
Hi,
I want to extract data from database table to a flat file using shell scripting. For loading data from file to a table, I had used SQL Loader. How can I do the vice versa using shell scripting.
Thanks in advance (3 Replies)
Hi there
I have a database on a remote box and i have been using shell script to insert data into it for example, i could have a script that did this
SN=123456
n=server1
m=x4140
sql="UPDATE main SET hostname='$n',model='$m' WHERE serial='$SN';"
echo $sql |/usr/sfw/bin/mysql -h... (4 Replies)
Hi,
I have the output (as below) which i want it to be in a table.
For e.g.
space utilization in PSE on path /logs is 0%
space utilization in PSE on path /logs/tuxedo/tuxlsp is 16%
space utilization in PSE on path /ldvarlsp/lsp/log is 37%
space utilization in PSE on path /home is 6%... (7 Replies)
Can i do this
Say one command
sed 's/:*/ /g' $summf
is returning
C1234
C2345
C3434
some no of rows, now this ouput i have to insert it into a DB table
how do i do this?? (2 Replies)
Hi All,
Can anyone give me Shell script sample script to generate Param file by Reading Values from SQL Plus query and it should assign those values to variables like..
$$SChema_Name='ORCL'
Thanks in Advance... Srav... (4 Replies)
I'm having trouble trying to create a BASH shell script.
I want the user to input a command "cat file_name.c" and then the shell script will delete all comments "/* */" from file_name.c else exit.
So far I have this:
#!/bin/bash
read "cat file" // User will input command cat... (7 Replies)
Hi scripting experts.
I have some coding challenges that I'm hoping you can help me out.
I have one file#1 that contains the following sql statement that spans over multiple lines:
sql Select /*+ use_has(a,b) */ *
from customer a,
customer_address b
where a.id = b.id... (1 Reply)
Table TAB1 contains following example data (its a tree sitting in table data format & its driven based CHILD & PARENT column pick the RULE condition to generate the below SQL:
CHILD PARENT SS MID MNM VNM RULE FLG
1 ? S1 ? ? V1 rule004 I
2 1 S1 ? ? V1 0 Z
3 1 S1 ? ? V1 1 Z ... (6 Replies)
Hi Gurus,
I have a very weird requirement and have no clue to resolve the issue. please help me get out this difficulty
below two tables, table1 contains the column name. D means this column used for the rule. for example: rule 0 is all columns have value, rule1 is col3 and col7 have no value.... (2 Replies)
Foe example we have three environments int,qa and prod.Each environment has some number of servers.
int=Server1,Server2,Server3
qa=Server4,Server5,Server6
prod=Server7,Server8,Server9
echo "Enter the Environment i.e int,qa,prod"
read env
case $env in
int)
## Need command where all the... (9 Replies)
Discussion started by: nareshreddy443
9 Replies
LEARN ABOUT DEBIAN
set_constraints
SET CONSTRAINTS(7) SQL Commands SET CONSTRAINTS(7)NAME
SET CONSTRAINTS - set constraint checking modes for the current transaction
SYNOPSIS
SET CONSTRAINTS { ALL | name [, ...] } { DEFERRED | IMMEDIATE }
DESCRIPTION
SET CONSTRAINTS sets the behavior of constraint checking within the current transaction. IMMEDIATE constraints are checked at the end of
each statement. DEFERRED constraints are not checked until transaction commit. Each constraint has its own IMMEDIATE or DEFERRED mode.
Upon creation, a constraint is given one of three characteristics: DEFERRABLE INITIALLY DEFERRED, DEFERRABLE INITIALLY IMMEDIATE, or NOT
DEFERRABLE. The third class is always IMMEDIATE and is not affected by the SET CONSTRAINTS command. The first two classes start every
transaction in the indicated mode, but their behavior can be changed within a transaction by SET CONSTRAINTS.
SET CONSTRAINTS with a list of constraint names changes the mode of just those constraints (which must all be deferrable). The current
schema search path is used to find the first matching name if no schema name is specified. SET CONSTRAINTS ALL changes the mode of all
deferrable constraints.
When SET CONSTRAINTS changes the mode of a constraint from DEFERRED to IMMEDIATE, the new mode takes effect retroactively: any outstanding
data modifications that would have been checked at the end of the transaction are instead checked during the execution of the SET CON-
STRAINTS command. If any such constraint is violated, the SET CONSTRAINTS fails (and does not change the constraint mode). Thus, SET CON-
STRAINTS can be used to force checking of constraints to occur at a specific point in a transaction.
Currently, only foreign key constraints are affected by this setting. Check and unique constraints are always effectively not deferrable.
Triggers that are declared as ``constraint triggers'' are also affected.
NOTES
This command only alters the behavior of constraints within the current transaction. Thus, if you execute this command outside of a trans-
action block (BEGIN/COMMIT pair), it will not appear to have any effect.
COMPATIBILITY
This command complies with the behavior defined in the SQL standard, except for the limitation that, in PostgreSQL, it only applies to for-
eign-key constraints.
SQL - Language Statements 2010-05-14 SET CONSTRAINTS(7)