How do the queue with the date?

Hi all

11.2.0.1

AIX 6

I have a sql script that runs every day and the coil its output to a txtfile. I want home date for leaving txtfile. How do I do that?

For example: prog1.sh

=======

#! / bin/sh

spool output1 {date}

Select empname emp where trunc (hiredate) = sysdate-1;

spool off

output

Thank you

pK

To send mail, you could use mutt in Shell scripts.

Mutt-s 'TOPIC' - c 'LIST OF CC' - an Emailid

Say, s 'FILE QUEUE' mutt - a 'spool.txt' [email protected]

Tags: Database

Similar Questions

  • How display the date of my last update of OSX in my Mac?

    How display the date of my last update of OSX in my Mac?

    If it was in the last 30 days, the updates will often (not always) show the Mac App store on your page of updates, under the heading "updates installed in the last 30 days.

  • How display the date and the time in the taskbar on Windows 7 Home Premium 64 bit system?

    How display the date and the time in the taskbar on Windows 7 Home Premium 64 bit system?

    I already did it.  The time is displayed in the correct format, but I can't seem to view the date of

    Any other suggestions?

    Thank you

  • How remove the date and time in image logging vision express

    I use express vision to capture a set number of images with the inline processing. I am opting to save images to a specified folder. However, the file names of the images have the date and time added by default. Is there a way to remove the date and time in the image file name? Help, please.

    Thank you very much. This has been useful. However I found another book about - I renamed it (using the movement vi) slam post files. Still, I would be interested if anyone has a better way to do it.

  • Re: How does the data retention?

    Hello guys

    How does the conservation of data in vC Ops? In the document it says data retention in the company is 900 days. But in the vSphere user interface, we can keep up to 4 years, which is by default and the minimum level. These two does not?

    There are also resolutions different weeks, monthly, quarterly, and annual. Suppose for example that if we maintain weekly resolution as 12 weeks and months 10, all the quarters 9 and annual 5 years as shown in the picture how it works? I mean after 12 weeks the data will be deleted, but we said 5 years for recall information. How this is achieved.

    Please help me

    Thank you

    VK

    Let me be more specific:

    1. the colelctor collects data interval 20 seconds every 5 min

    2. it is wrapped in a 5 min avg and max value.

    3. these values 5 min is rolled up to hourly, daily, weekly... ect... for two reasons: capacity and analysis of dynamic thresholds which is stored in two databases diffenent calculations.

    It does not compress the stats... it gets stats avg. (Analysis uses avg to get trends used for forcasting ability... ect)

  • How handle the date of the leap year in the query?

    Dear Exparts
    Hope you will be fine.
    Here is my banner
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    I have a date field name birth_date where I stored the date of birth. I need to choose the date of birth in a given range. For example
    BIRTH_DATE
    -------------------------
    01-FEB-1980
    12-FEB-1984
    29-FEB-1992
    01-MAR-1986
    01-APR-1986
    22-APR-1988
    01-MAR-1992
    The setting of my research is
    brith_date between 01/02/13 and 01/04/13
    I want the file
    01-FEB-1980
    12-FEB-1984
    29-FEB-1992
    01-MAR-1986
    01-APR-1986
    Here is the script
    create table
    CREATE TABLE DATE_OF_BIRTH 
    (
      BIRTH_DATE DATE 
    );
    inserting data
    insert into DATE_OF_BIRTH 
    values(to_date('01-FEB-1980','DD-MON-RRRR'));
    insert into DATE_OF_BIRTH 
    values(to_date('12-FEB-1984','DD-MON-RRRR'));
    insert into DATE_OF_BIRTH 
    values(to_date('29-FEB-1992','DD-MON-RRRR'));
    insert into DATE_OF_BIRTH 
    values(to_date('01-MAR-1986','DD-MON-RRRR'));
    insert into DATE_OF_BIRTH 
    values(to_date('01-APR-1986','DD-MON-RRRR'));
    Thanks in advance... (Thanks to Frank Kulash)

    ask2Learn

    Published by: asked to learn, on 24 February 2013 19:40
    select  *
      from  date_of_birth
      where to_char(birth_date,'mmdd') between '0201' and '0401'
    /
    
    BIRTH_DAT
    ---------
    01-FEB-80
    12-FEB-84
    29-FEB-92
    01-MAR-86
    01-APR-86
    
    SQL>
    

    SY.

  • How schema is associated with a data source?

    Hello

    Could someone explain to me please how a based on a "Data Connection" in designer pattern fills in the data? As in, how you specify the source of data which the scheme applies?

    The actual data origin... it's a web application, a Web Service, a database, or an XML file?

    Where are the good examples of this?

    I've looked up and down, but couldn't find good examples on the real data source which is part of the XML schema.

    Thanks in advance.

    Hi Ray,

    Pre-populating data in a form by using the data connection "XML Schema" is executed on the server in a LiveCycle ES process.

    As it is a common question that I get from my clients, I wrote a detailed blog, explaining your options for pre-load of.

    Ben Walsh

    www.Avoka.com

  • How do I queue with a timestamp/seq_number in the name of the file

    Hi I try to write a test script that have some sort of timestamp or seq_number in file name of the output file of the coil itself.

    If e.g..


    test_abc_20120425161616.txt

    I can do it on the shell, but is there a way I can do it in sqlplus.
    I remember that I see something similar in statpack long ago...

    SQL > column tm new_value file_time noprint
    SQL > select to_char (sysdate, 'YYYYMMDDhh24miss') tm double;

    SQL > guest & file_time
    20120425094549
    SQL > spool C:\logfile_id&file_time... Journal
    SQL >

  • ADF how complete the data when the page is loaded

    I want to fill with data on a table page loading time 2 or more by pressing the key.

    Hello

    "Expensive another problem that I have a parameter for example P_teacher_id and which connection teachers with his ID he can see his own presence and review... mean how to pass single parameter on multiple pages."

    Equip your variable longer scope (Session or Page Flow) range use throughout the application...

    Thank you.

  • How do the date format default level of change request

    Hello

    How can I change the default level to mon-dd-yyyy dd-MON-rr enforcement? It must also be found in the table in the same format.


    Thank you
    Mary

    Shared-->--> globalization tab definition components is defined.

  • How to start db with a date error?

    Hi all

    11.2.0.1

    I run the command > ' ALTER SYSTEM value nls_date_format = ' bb/mm/yyyy' SCOPE = SPFILE; "

    Then I immediately stopped and database startup. But I got error > ORA-01821: date format not recognized

    I noticed that instead of "dd" I typed 'bb' where the error. I don't have a backup of init.ora or spfile.

    How can I fix this error? I can't start my db more

    Thank you

    f55237a7-2c38-4DB3-a7a3-1d77256f0730 wrote:

    Hi all

    C:\Users>sqlplus / as sysdba

    SQL * more: Production release 11.2.0.1.0 Wed Nov 27 17:52:28 2013

    Copyright (c) 1982, 2010, Oracle.  All rights reserved.

    Connect to an instance is idle.

    SQL > startup nomount;

    ORA-01821: date format not recognized

    SQL >

    Do not attempt to start the instance. You can run CREATE PFILE... FROM SPFILE connect immediately.

  • How to resolve problems with loading data not completely: empty pages and full with only listed infp left of page images.

    Some time to reload will fix. Recently it does not either.

    If you use extensions (Firefox/tools > Modules > Extensions) which can block content (e.g., Adblock Plus, NoScript, Flash Block, Ghostery) then make sure that these extensions are not blocking content.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the startup window Mode without failure.

    Reload Web pages and ignore the cache to refresh potentially stale or corrupt.

    • Hold down the SHIFT key and click the Reload button
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Command + shift + R' (Mac)

    Clear the cache and cookies only from Web sites that are causing problems.

    "Clear the Cache":

    • Firefox/tools > Options > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox/tools > Options > privacy > Cookies: "show the Cookies".
  • Flatten the data in, SELECT

    Oracle 11 g 2

    Linux Mint

    ==========

    In light of the following:

    create table grades_detail (school_year char (4),
    grade char(1),
    grade_desc 40,
    constraint pk_grades_detail primary key (school_year, grade));

    create table class_grades_detail (student, char (6),)
    school_year char (4),
    class1_grade char (1),
    class2_grade char (1),
    class3_grade char (1),
    class4_grade char (1),
    constraint pk_class_grades_detail primary key (student, school_year));


    insert into grades_detail values ('2013', 'A', 'Excellent');
    insert into grades_detail values ("2013", 'B', 'Good');
    insert into grades_detail values ("2013", 'C', 'Medium');
    insert into grades_detail values ('2013 ',' d ", 'Poor');
    insert into grades_detail values ("2013", 'F', 'Bankrupt');

    insert into class_grades_detail values ('1001', '2013', 'A', ",", ");
    insert into class_grades_detail values ('1002 ', ' 2013', ","B",",");
    insert into class_grades_detail values ('1003 ', ' 2013', ",", "C", ");
    insert into class_grades_detail values ('1004 ', ' 2013', ",",", ');
    insert into class_grades_detail values ('2005', '2013', 'A', ","C",");
    insert into class_grades_detail values ('2006', '2013', 'A', ",", 'F');
    insert into class_grades_detail values ('2007', '2013',' A ',' B', ",");
    insert into class_grades_detail values ('2008', "2013" ", would be", ", had ',");

    and given the following SQL code:

    Select class_grades_detail.student
    class_grades_detail.school_year
    class_grades_detail.class1_grade
    class_grades_detail.class2_grade
    class_grades_detail.class3_grade
    class_grades_detail.class4_grade
    grades_detail.grade_desc
    of class_grades_detail
    class_grades_detail.school_year left join grades_detail = grades_detail.school_year
    and (class_grades_detail.class1_grade = grades_detail.grade
    or class_grades_detail.class2_grade = grades_detail.grade
    or class_grades_detail.class3_grade = grades_detail.grade
    or class_grades_detail.class4_grade = grades_detail.grade);

    How 'flatten' the data to get a result like below?

    (Yes, I know the SQL above has not all the columns in gradeX_desc below, but that's what I'm aiming for - a column for each class descr.)  However, the SQL above will show you the data as it appears currently):

    student, school_year, class1_grade, grade1_desc, class2_grade, grade2_desc, class3_grade, grade3_desc, class4_grade grade4_desc

    1001 2013 A B excellent C good average poor D

    With the SQL above I have not (of course) get it.  Yes, I think to Swivel, but could not get this to work.  Even tried to DECODE.

    Any help would be appreciated.

       select distinct
                cgd.student, cgd.school_year,
                 MAX(cgd.class1_grade) g1, MAX(gd1.grade_desc ) grade1,
                 MAX(cgd.class2_grade) g2, MAX(gd2.grade_desc ) grade2,
                 MAX(cgd.class3_grade) g3, MAX(gd3.grade_desc ) grade3,
                 MAX(cgd.class4_grade) g4, MAX(gd4.grade_desc ) grade4
         from class_grades_detail cgd,
              grades_detail gd1,
              grades_detail gd2,
              grades_detail gd3,
              grades_detail gd4
        where gd1.school_year(+) = cgd.school_year
          and gd2.school_year(+) = cgd.school_year
          and gd3.school_year(+) = cgd.school_year
          and gd4.school_year(+) = cgd.school_year
          and gd1.grade(+) = cgd.class1_grade
          and gd2.grade(+) = cgd.class2_grade
          and gd3.grade(+) = cgd.class3_grade
          and gd4.grade(+) = cgd.class4_grade
       group by cgd.student, cgd.school_year
    

    STUDENT SCHOOL_YEAR G1 G2 G3 G4 GRADE4 GRADE3 GRADE2 GRADE1

    ------- ----------- -- ------------ -- ------------ -- ------------ -- ------------

    Good 1002 2013 B

    2006 2013 A F excellent Fail

    Good 2007-2013 has excellent B

    1004    2013                                                        D  Poor

    1001 2013 has excellent

    2008 2013 D D poor poor

    1003 2013 C average

    2005-2013 A C average excellent

    8 selected lines.

  • Formula to determine the size of the data store

    Is there a formula or a rule of thumb used to determine the size of a data store?

    For example, if I have 10 virtual computers that will need 20 GB of disk space, how big the data store be? I know that I have 200 GB of space for real virtual machines, but what other factors should be considered when sizing the data store?

    We usually leave 15 to 20% free space on all our datastoes.

    Here is a good article that can be useful to you as well

    http://SearchVMware.TechTarget.com/Tip/0, 289483, sid179_gci1350469_mem1, 00.html

  • HRCS 9.0 database installation script does not have the Data Mover Bootstrap

    People,

    Hello. I'm working on Campus Solution 9.0 and human resources.

    Atfter install HRCS 9.0 in PeopleTools 8.49, I create a script and run the script to load data into a database using the Data Mover Bootstrap HRCS.

    Data Mover Bootstrap mode, when the script imports about 1,000 records in the database, the Data Mover becomes unresponsive. How do the Data Mover to continue to run the script?

    As I said previously, you should check the log generated by the MDS file and as explained Jean-Marc, despite his suspended looks, the script can continue behind.
    A database of loading may take some time, depending on the configuration of the server/network.
    If you have an error in the unique key, this means that the tables has already loaded, so you can drop it and restart the DMS of this table or restart from scratch.

    Nicolas.

  • Set the Date of Expiration of account in AD

    How set the date account expiration in AD when an end date is defined in the IOM on creating an account? I created a pre-fill adapter in my AD form which corresponds to the Date of the end of the IOM. This gives a java.lang.ClassCastException: java.lang.String cannot be cast as a java.sql.Date error.
    I have to get the date in a custom adapter convert to date and then set it up? I tried using ud_aduser_date as a field whose value has been set. Did nothing.

    You can access data on the forms of process and the Forms user since any custom adapter.

    The design model standard of creating a field on the form of process is used to facilitate the maintenance, recon, and debugging.

    It is worth noting that AD uses a special date to the expiry date format so if the output of the connector box lacks the functions to set the expiration date in AD wou will manually create the logic of translation.

    Best regards
    / Martin

Maybe you are looking for

  • Equium A210 - 17I PSAFJE - Lan and Wlan don't work running Windows XP

    Hello I recently received this A210-17I (PSAFJE) for Christmas, but to my dismay, it was not compatible with most of my computer games, I decided to downgrade to Windows XP, after reading about how I could do this, I decided to do it myself. So far e

  • How can I record what is streaming without picking up the sounds of the room?

    I try to record audio playback is on my computer, but it captures all the sounds in the room also as Barking Dog, TV, conversation.I have a Dell Inspiron 1525 running Vista Home version.

  • Difficult to reload windows 7

    Lenova just sent me a few windows 7 rescue disks. I followed the instructions until I get to the bit where I have to name the driver of dvd as the source of the info and it won't let me. Just no response when I press on no enter, again and again. Onc

  • Monitor E2014T

    recently received dell touch monitor e2014t. works fine except for 1 problem. After he falls asleep, thr only way to wake up is with the mouse or key board.this is on computer dell 660 s with win8. y at - it something I need to do or is - this normal

  • Unable to display the log file in windows 7

    Hi all for all of you who are familiar with the text game, I use customer gMUD a certain game. gMUD is able to record activity as a document that is readable by microsoft Notepad. so, one evening I played and connected my activity where the customer