Hi Folks,
I am trying to strip away the last five characters from the file name. Following is an example
Input: file1.done
Output: file1
My nawk script is as follows
BEGIN {
# Set the field separator to white space
FS=" "
}
{
print | "mv " $9 " " substr($9, 1,length($9)-5)
}
I am...
Hi Folks,
I need help to pass a double quoted string as parameter to my korn shell script.
The shell script is as follows
=========================================
#!/bin/ksh
# File Name: test.ksh
received=$0
echo $received
========================================
Execution:
logmsg="This...
Hi Folks,
I have been tasked with writing (my first) functional requirements document to make enhancements to an existing data warehouse. Can somebody please list the things that go in a functional spec document ? Or can somebody please post a sample functional spec ?
Thanks in advance
rogers42
Hi Folks,
Thanks for all the well meaning and helpful replies. I had already double checked some of the suggestions (e.g. getting rid of funny characters, multi stage loading, etc).
What did the trick is the use of keyword "CONSTANT". The working control file is as follows
LOAD DATA
INFILE...
Hi,
Thanks for the reply. Actually none of the records had loaded. I had cut & paste randomly from the error log.
The contents of the log file from the begining are as follows
Control File: 24.153.0.210.ctl
Data File: 24.153.0.210.csv
Bad File: 24.153.0.210.bad
Discard File...
Hi Folks,
I have a data file with three comma delimited columns. I am trying to load just the first column from the file into an Oracle table. The remaining table columns should contain hardcoded values.
My table looks as follows
Name Null? Type
---------- --------...
Hi,
Yes, your analysis is correct, however, my data set is not. The corrected sample data is as follows
prov, free, sub, paid
======================
aa, null, null, Y
bb, Y, null, null
cc, null, Y, null
Bottom line, one of the three fields will always be a "Y" while the other two fields will...
Hi Mufasa,,
Thanks for the reply. Let me start out by answering some of your questions.
1, Yes the logic looks flawed because I had omitted the fact that all records have a"Y" or "N" value for only one of the fields (i.e. FREE, SUB, or PAID). While the other two fields will always be null...
Hi Folks,
tab_1 has 60K records
tab_2 has 90 records
Both tables are indexed
The code to update one of tab_1 columns is as follows
DECLARE
v_flag CHAR(1);
CURSOR c_provider IS
select p.PROV, p.FREE, p.SUB, p.PAID
from tab_1 p,
tab_2 vab
where p.PROV = vab.PROV
and...
Hi Folks,
I need help with the "sort" command syntax. Essentially, I would like to sort the data (in descending order) on the second field
Sample Data:
============
:03.mpg: 14
:03TB.mpg: 8
:04TV_NR.mpg: 8
:102_FINAL.MPG: 11
Desired Results:
=================
:03.mpg: 14
:102_FINAL.MPG: 11...
Contents of Data File:
123-2009-123-123
456-2008-123-0
789-2009-100-0
awk Code:
BEGIN {
# Set the field seprator
FS="-";
}
/2009/
{
print "Updating " $2 " data";
}
}
Output:
All lines are printed
I am executing my script as follows
cat test.dat | nawk...
In terms of any good books, I have found the following to be a good introductory text.
Title: "Oracle Database 10g Data Warehousing"
Authors: Hobbs, Hillson, Lawande, and Smith"
The text covers all available partitions. Plus, you will also be exposed to some more free bees (e.g. Oracle...
Hi Folks,
I need help with loading a partitioned table using the sql loader. Details are as follows
Table Structure:
Name Null? Type
------- -------- ----------------------------
FIELD_1 VARCHAR2(10)
FIELD_2...
Perhaps I had not stated the question quite clearly. But, "exec immediate" was what I was looking for in order to execute the code.
Thanks for the prompt replies guys
rogers42
Hi Folks,
I would like to package the following code in a file (on Unix) and to execute it via the Oracle schedular. However, I can't seem to make the dynamic part of the code to execute.
Can somebody please make a suggestion.
The code is as follows
select case when to_char(SYSDATE, 'DY')...
Hi Folks,
Given a "Range" or a "List" partitioned table, how can I find out if the data really ended up in the correct partition ? Put another way, how can I get a dump of a specific partition ?
The solution that I have come up is to
1, create a table with "List" partition
2, populate table...
Please ignore my previous post. I re ran the query and it displayed the correct results
WHAT
--------------------------------------------------------------------------------
LAST_DATE NEXT_DATE NEXT_SEC
--------- --------- --------
dbms_refresh.refresh('"TEST"."MV_TEST"');
21-JAN-09 22-JAN-09...
I have re created the mv based on the recommendations. However, I get some puzzling results when I execute the following query
select what, last_date, next_date
from dba_jobs
where upper(what) like '%MV_TEST%';
Output:
dbms_refresh.refresh('"TEST"."MV_TEST"');
21-JAN-09
The "last_date" is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.