Sponsored Content
Top Forums Shell Programming and Scripting How to insert date in a statement? Post 302537706 by bartus11 on Saturday 9th of July 2011 11:36:22 AM
Old 07-09-2011
Based on Solaris & yesterday date? /dev/random
Code:
TZ=GMT-24 date +%Y%m%d

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk command for INSERT statement

Hi, I sometimes bulk upload data in oracle. The problem is that I sometimes get an INSERT statemnt like this: INSERT INTO ALL_USER_HOTSPOT_DETAILS (USR_LOGIN,USR_LASTNAME,USR_FIRSTNAME,USR_EMAIL, PROPERTYNR) VALUES ('SABRDAG','D'AGOS','SABRINA','sabrina_d'agos@sheraton.com',70) I... (4 Replies)
Discussion started by: nattynatty
4 Replies

2. Shell Programming and Scripting

Insert TAB in echo statement

Hi, Can some1 help me to output a tab in an echo statement. I have tried echo "RNC: \t NODEB" but dont get the correct output. I am a beginnger to unix, so pls hold back the laughs....if u can (5 Replies)
Discussion started by: sunils27
5 Replies

3. Shell Programming and Scripting

Script does not execute Insert Statement

Hi I have a text file , contents are Line1:field1,field2,field3,field4,field5,field6.......field20 Line2:field1,field2,field3,field4,field5,field6.......field20 Line3:field1,field2,field3,field4,field5,field6.......field20 ....and so on... I want to read this file and insert the data into... (4 Replies)
Discussion started by: Amruta Pitkar
4 Replies

4. Shell Programming and Scripting

How is use sselect statement o/p in insert statement.

Hi All, I am using Unix ksh script. I need to insert values to a table using the o/p from a slelect statement. Can anybody Help! My script looks like tihs. ---`sqlplus -s username/password@SID << EOF set heading off set feedback off set pages 0 insert into ${TB_NAME}_D... (2 Replies)
Discussion started by: nkosaraju
2 Replies

5. Shell Programming and Scripting

error in insert statement

hi, When i try to run the code below, i get the following error "ksh: syntax error: `(' unexpected" i am not able to figure it out. Can anyone help me? Code: (2 Replies)
Discussion started by: ragavhere
2 Replies

6. Programming

Dynamic Insert statement

I have a form , where i will put the values to a table. I wrote a insert statement for the same. Table structure is ename | character varying(30) | eadd | character varying(30) | eid | integer | sal | integer In the statements, i don't... (1 Reply)
Discussion started by: pritish.sas
1 Replies

7. Programming

Assign variable for INSERT INTO statement

Hello, Can anyone tell me that, How can I assign variable to shell script variable, which i need to use in INSERT INTO statement? my shell script variables are, EMPNAME=`regular expression` EMPID=`regular expression` EMPBDATE=`regular expression` Now through ksh script I am... (16 Replies)
Discussion started by: Poonamol
16 Replies

8. Shell Programming and Scripting

How to insert numbers to a in between statement

Hi Guys, I want to create a shell script that will give me the output below. I want to insert the numbers from the input file to my url addresses below. And from the numbers below, I want to separate the last digit with a period (i.e. from 222222222222 to 22222222222.2). Appreciate any help.... (14 Replies)
Discussion started by: pinpe
14 Replies

9. Shell Programming and Scripting

Convert Update statement into Insert statement in UNIX using awk, sed....

Hi folks, I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex. I have a bunch of update statements with all columns in a file which I need to convert into insert statements. UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies

10. Shell Programming and Scripting

Single quotes insert statement using awk

Hi, Need help, using awk command to insert statement awk -v q="'" '{ print "db2 connect to repolab > /dev/null; " "\n" "db2 -x \" select name from IBMPDQ.PROFILE where managed_database = " q $1"_"$3"__0" q "\"" } ' profile.txt | sh - | awk -v i="'" ' { print "db2 connect to repolab >... (1 Reply)
Discussion started by: Mathew_paul
1 Replies
EXECUTE(7)                                                         SQL Commands                                                         EXECUTE(7)

NAME
EXECUTE - execute a prepared statement SYNOPSIS
EXECUTE name [ ( parameter [, ...] ) ] DESCRIPTION
EXECUTE is used to execute a previously prepared statement. Since prepared statements only exist for the duration of a session, the pre- pared statement must have been created by a PREPARE statement executed earlier in the current session. If the PREPARE statement that created the statement specified some parameters, a compatible set of parameters must be passed to the EXECUTE statement, or else an error is raised. Note that (unlike functions) prepared statements are not overloaded based on the type or number of their parameters; the name of a prepared statement must be unique within a database session. For more information on the creation and usage of prepared statements, see PREPARE [prepare(7)]. PARAMETERS
name The name of the prepared statement to execute. parameter The actual value of a parameter to the prepared statement. This must be an expression yielding a value that is compatible with the data type of this parameter, as was determined when the prepared statement was created. OUTPUTS
The command tag returned by EXECUTE is that of the prepared statement, and not EXECUTE. EXAMPLES
Examples are given in the Examples [prepare(7)] section of the PREPARE [prepare(7)] documentation. COMPATIBILITY
The SQL standard includes an EXECUTE statement, but it is only for use in embedded SQL. This version of the EXECUTE statement also uses a somewhat different syntax. SEE ALSO
DEALLOCATE [deallocate(7)], PREPARE [prepare(7)] SQL - Language Statements 2010-05-14 EXECUTE(7)
All times are GMT -4. The time now is 06:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy