To pass one month range in sql script


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users To pass one month range in sql script
# 8  
Old 01-20-2016
How can i pass dates in my query

Code:
INSERT INTO master t
SELECT /*+ PARALLEL(t1,8) */ * FROM T1 t1 where date_col between '&start_date' and '&end_date';

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unable to pass value from .Shell script to .SQL file

Hi All, I am new to shell script. I am trying to pass value from .sh file to .sql file . But I am able to run the .sql file from .sh file with values in sql file. But I am unable to pass the values from .sh file. can some one please help to resolve this. here is my .sh file s1.sh ... (4 Replies)
Discussion started by: reddy298599
4 Replies

2. Shell Programming and Scripting

How to pass Oracle sql script as argument to UNIX shell script?

Hi all, $ echo $SHELL /bin/bash Requirement - How to pass oracle sql script as argument to unix shell script? $ ./output.sh users.sql Below are the shell scripts and the oracle sql file in the same folder. Shell Script $ cat output.sh #!/bin/bash .... (7 Replies)
Discussion started by: a1_win
7 Replies

3. Shell Programming and Scripting

How to add decimal month to some month in sql, php, perl, bash, sh?

Hello, i`m looking for some way to add to some date an partial number of months, for example to 2015y 02m 27d + 2,54m i need to write this script in php or bash or sh or mysql or perl in normal time o unix time i`m asking or there are any simple way to add partial number of month to some... (14 Replies)
Discussion started by: bacarrdy
14 Replies

4. Shell Programming and Scripting

pass null value to sql script from korn shell script

There are 4 parameters that I have to pass from korn shell to sql script. 1) I have to check if $1 , $2 , $3 and $4 are null values or not . How can I do that ? 2) Once its determined that these values are null (in the sense they are empty) how can I pass null values to sql script... (11 Replies)
Discussion started by: megha2525
11 Replies

5. Shell Programming and Scripting

How to put date range from a perl & sql script

Hi Guys, Can someone please help me on adding/inserting a variable date to an sql scipt? Basically I want to assign a 7 days date range. As shown below.. #!/usr/bin/perl use strict; use Env qw(ORACLE_HOME); my $SQLPLUS='/opt/oracle/product/10.1.0/db_1/bin/sqlplus -S... (1 Reply)
Discussion started by: pinpe
1 Replies

6. UNIX for Advanced & Expert Users

How to use parameter in sql script pass from unix script?

Hi, I am unable to use parameter in sql script passed from unix script. my sql script CREATE_SBI_LIST_GROUP.sql is like this - ------------------------------- SELECT SDS.ID "SO_ID", SDS.SO a1, sgp.sga__code SGA_CODE, FROM sga sga,sales_genl_provision sgp , comm_product_condn cpc... (2 Replies)
Discussion started by: apskaushik
2 Replies

7. Shell Programming and Scripting

Pass a variable to SQL script

Hi Guys, I like to pass a variable to a sql file in a unix script.. I tried a below code.. var=200903 db2 -vf test.sql 200903 test.sql is as below. select * from db2.users where quarter = $1; Please tell me where i go wrong.. Thanks in advance, Magesh (2 Replies)
Discussion started by: mac4rfree
2 Replies

8. Shell Programming and Scripting

How to pass pl/sql table values to shell script

Hello, i am using '#!/bin/bash', i want to make a loop in pl/sql, this loop takes values from a table according to some conditions, each time the loop choose 3 different variables. What i am not able to do is that during the loop i want my shell script to read this 3 variables and run a shell... (1 Reply)
Discussion started by: rosalinda
1 Replies

9. Shell Programming and Scripting

pass input arguements to DB2 SQL script

Hi all, I have a shell script which invoke a sql script using command db2 -tf /home/me/db_housekeep.sql -z /home/me/db_housekeep.log however, this mentioned sql script requires several input arguments, I wonder if one can pass variables from shell script to sql script? thanks! (0 Replies)
Discussion started by: mpang_
0 Replies

10. Shell Programming and Scripting

Pass multiple variables to SQL script

I am trying to close of multiple users in an Oracle database. Each users has records in multiple tables what I need to do is use a script that call each SQL seperately passing either CLI arguments or gathered arguments from the users during run time. ## Accept variable(s) from the command line... (1 Reply)
Discussion started by: jagannatha
1 Replies
Login or Register to Ask a Question
ARBITRON(8)						      System Manager's Manual						       ARBITRON(8)

 *

NAME
arbitron - arbitron mailboxes SYNOPSIS
arbitron [ -C config-file ] [ -o ] [ -u ] [ -l ] [ -p months ] [ -d days | -D mmddyyyy[:mmddyyyy] ] mailbox... DESCRIPTION
Arbitron collects and reports readership statistics for mailboxes on the server. It also optionally prunes the mailboxes of Seen state for dormant users. Arbitron produces one line of output per mailbox, reporting the mailbox name followed by a space, followed by the number of readers (and if -u is specified, followed by a colon and a comma-separated list of the readers userids), and if -o is not specified, another space and the number of subscribers (and if -u is specified, followed by a colon and a comma-separated list of the subscribers userids). IMPORTANT: This format is subject to change in future versions. Each "reader" is a distinct authentication identity which has "s" rights to the mailbox and which has SELECTed the mailbox within either the past days days or the specified date range. Users are not counted as reading their own personal mailboxes. Personal mailboxes are not reported unless there is at least one reader other than the mailboxes owner. Arbitron reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C. OPTIONS
-C config-file Read configuration options from config-file. -o "old way" -- do not report subscribers. -u Report userids in addition to the count(s). -l Enable long reporting (comma delimited table consisting of mbox, userid, r/s, start time, end time). -d days Count as a reader an authentication identity which has SELECTed the mailbox within days days. Default is 30. -D mmddyyyy[:mmddyyyy] Count as a reader an authentication identity which has SELECTed the mailbox within the given date range. The start date and optional end date are specified as 2-digit month of the year, 2-digit day of the month, and 4-digit year. If the end date is not specified, then the current system time is used as the end time. -p months Prune Seen state for users who have not SELECTed the mailbox within months months. Default is infinity. FILES
/etc/imapd.conf CMU
Project Cyrus ARBITRON(8)