Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. rogers42

    Need help to execute Unix commands from awk script ?

    That's exactly what I was looking for. Thanks rogers
  2. rogers42

    Need help to execute Unix commands from awk script ?

    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...
  3. rogers42

    Need help with passing double quoted string to a Korn shell script

    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...
  4. rogers42

    Need help with DWH Function Spec

    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
  5. rogers42

    How to load a single column using sql loader

    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...
  6. rogers42

    How to load a single column using sql loader

    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...
  7. rogers42

    How to load a single column using sql loader

    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 ---------- --------...
  8. rogers42

    Need help to speed up updates to a table

    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...
  9. rogers42

    Need help to speed up updates to a table

    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...
  10. rogers42

    Need help to speed up updates to a table

    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...
  11. rogers42

    Need help with the Unix "sort" command

    Figured it out :) The command should have been "sort +1nr title_count.log | more" Thanks rogers42
  12. rogers42

    Need help with the Unix "sort" command

    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...
  13. rogers42

    Need help with the syntax

    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...
  14. rogers42

    tuning sql for counting no of rows with x no of consecutive numbers

    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...
  15. rogers42

    Partitioned tables & sql loader question

    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...
  16. rogers42

    How to execute dynamic sql code

    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
  17. rogers42

    How to execute dynamic sql code

    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')...
  18. rogers42

    How to troubleshoot a partitioned table

    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...
  19. rogers42

    Need help with defining a materialized view refresh frequency

    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...
  20. rogers42

    Need help with defining a materialized view refresh frequency

    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...

Part and Inventory Search

Back
Top