create table .....;
create index ....;
create trigger...;
and I want to substitue from my file ; by ;-- from the line where appears create trigger to the end of the file and keep intact the create table step and index in the file.
I want to replace columns 15 thru 22 with a date in this format mmddyyyy in a file that has fixed record length of 110 columns. Only lines with column 1 = "T" will be changed but I can't seem to get it to work.
I saw several postings and tried to work with them but they don't work for me...
... (12 Replies)
for the command below, it looks for the 3rd field value matching "P" and printing it.
awk '{if ($3 == "P") print}' file
how would i express this if i use a loop to find more that 1 variable fro a list? this doesn't seem to work...
cat list | while read n
do
awk '{if ($3 == "$n") print}'... (1 Reply)
I'm facing a problem when trying to read a file and convert the content from char to decimal in ASCII. :confused:
eg :-
Input file :
20051231 8.00
experted result :
50484853495051493256464848
The content of input file is vary very day.
I need to use AWK script to program it.
Pls... (4 Replies)
I need to copy field 2 to field 3 for only those records that have the 1st field equal to account
e.g. file
account|123|789|xxx|yyy|zzz|...
account_group|444|555|xxx|yy|zz|....
account|456|901|aaa|bbb|ccc|.....
after running awk script should look like
account|123|123|xxx|yyy|zzz|...... (4 Replies)
Hi again.
A have a CSV-file in the following format:
2008.09.01,15:17:42,9227096485,9233175320,CTC10,SMS,0901151742098314,Target_MSIS
DN_is_blacklisted
I want to have an awk command that will say:
If the first 3 digits of $4 does not begin with 922 or 923, then make $8 say "Invalid... (3 Replies)
I am trying to use AWK to replace dallinux02 to dallinux03 everywhere in the servers.txt file and move it over to "awk2".
Here is my script "awk2.awk":
gsub(/dallinux02/, "dallinux03"); print > "awk2"
I am trying to run this using the following:
$ awk -f awk2.awk... (3 Replies)
Hi everyone,
suppose that I have the following line:
#test your knowledge
can I use AWK to print the word "test" only? without the #?
what should I change to this:
awk '{print $1}'
thanks in advance guys (2 Replies)
Hi all,
I need some help with substitution in awk.
Is it possible to substitute field from awk output with string from file?
For example:
zcat /SMS/CDR/cdr_TC/callLogs*_*_2013092710*.gz | sed 's/:/;/g' | awk -F";" '{if($2==1 && $10~/389123456789/) print $36";"$37}'
2;19733248
I want... (6 Replies)
Hello Friends,
I would appreciate so much if you could explain how the underscores works at the following code? Sorry if it sounds a bit novice question.
awk -F',' 'NR==FNR{_=1;next}!_{print}' exclude infile
KR,
Eagle (6 Replies)
Discussion started by: EAGL€
6 Replies
LEARN ABOUT SUSE
alter_trigger
ALTER TRIGGER(7) SQL Commands ALTER TRIGGER(7)NAME
ALTER TRIGGER - change the definition of a trigger
SYNOPSIS
ALTER TRIGGER name ON table RENAME TO newname
DESCRIPTION
ALTER TRIGGER changes properties of an existing trigger. The RENAME clause changes the name of the given trigger without otherwise changing
the trigger definition.
You must own the table on which the trigger acts to be allowed to change its properties.
PARAMETERS
name The name of an existing trigger to alter.
table The name of the table on which this trigger acts.
newname
The new name for the trigger.
NOTES
The ability to temporarily enable or disable a trigger is provided by ALTER TABLE [alter_table(7)], not by ALTER TRIGGER, because ALTER
TRIGGER has no convenient way to express the option of enabling or disabling all of a table's triggers at once.
EXAMPLES
To rename an existing trigger:
ALTER TRIGGER emp_stamp ON emp RENAME TO emp_track_chgs;
COMPATIBILITY
ALTER TRIGGER is a PostgreSQL extension of the SQL standard.
SEE ALSO
ALTER TABLE [alter_table(7)]
SQL - Language Statements 2010-05-14 ALTER TRIGGER(7)