05-30-2003
Google,
Thanks for the prompt reply.
As I mentione before I'd like to get a value (like a value of a variable) from PL/SQL "SCRIPT" (not a function or procedure) back to the calling Unix script... I know how to do it when I call a stored function simply by return a value (return somevarable
Mind you I can not pass a value to a PL/SQL script (or I don't know how)
Thanks again...
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
two programs A and B writting in c++
I am using A to B and I want to know the return code of B.
in B
------------------------
int main()
{
return 11;
}
------------------------
in A
------------------------
int main()
{
system(A);
}
------------------------
Is it the right way... (1 Reply)
Discussion started by: filedeliver
1 Replies
2. Shell Programming and Scripting
hi all
my system is linux red hat
i have a script that runs some object .
the object return some code to the system
i see the code by writing echo $?
i want to ask in the script if $? equals 14
how shell is do that in the script
thanks (3 Replies)
Discussion started by: naamas03
3 Replies
3. Shell Programming and Scripting
hey all,
I have a simple script
#!/bin/bash
./cron.sh test_a.txt &
./cron.sh test_b.txt &
wait
I want to invoke another program based on the return status of the above calls. How am I were to get that? Thanks! (2 Replies)
Discussion started by: mpang_
2 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'.
I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies
5. Shell Programming and Scripting
Hi Guys,,
I am having a unix script which is running the DB2 Insert command.
For the insert command, there were no records to be updated.
SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a
query is an empty table. SQLSTATE=02000
+ + echo 1
STAGE_RC=1
+ ]
... (6 Replies)
Discussion started by: mac4rfree
6 Replies
6. Shell Programming and Scripting
Hello folks,
I have a question that if i type ls command and type echo $? it always show "0", how i could do this change that when i type ls it will show me 1, actually i want to change the return code of commands from 0 to 1.
Thanks
Bash (5 Replies)
Discussion started by: learnbash
5 Replies
7. Shell Programming and Scripting
Hi guys,
I am quite new in shell scripting.
I am tring to promote some oracle jobs into control-M. In control-M, I am calling a script which establishes a connection with database and execute some procedures. Now I want if that PL/sql Block got failed script should return failure to... (2 Replies)
Discussion started by: alok1301
2 Replies
8. UNIX for Advanced & Expert Users
Hi Experts:
I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
Discussion started by: huasheng8
3 Replies
9. Shell Programming and Scripting
Hello,
I am woring on a script where I am getting strange situation.This script actually fetch the source code and tar that code and send to NAS location.This code resides in MKS tool...and we are fetching the source code on checkpoint label basis and script is working fine.First it synch the... (0 Replies)
Discussion started by: anuragpgtgerman
0 Replies
10. UNIX for Beginners Questions & Answers
Hello everyone
Can some help me with understand return code in expect
#!/usr/bin/expect
set timeout 1
set SRV
set user
set pw
spawn ssh $user@$SRV
expect {
"(yes/no)? " { send "yes\r" ; exp_continue }
"assword: " { send "$pw\r" ; exp_continue }
eof
}... (2 Replies)
Discussion started by: vikus
2 Replies
LEARN ABOUT PHP
sql-acceptable-by-4d
SQL-ACCEPTABLE-BY-4D(3) 1 SQL-ACCEPTABLE-BY-4D(3)
SQL acceptable by 4D - PDO and SQL 4D
4D implements strictly the ANSI 89 standard, and have it enforced. It is highly recommended to read the 4D SQL documentation to learn
about the available commands. The URL of the manual is : http://doc.4d.com/. Below is a list of 4D SQL characteristics: it is not exhaus-
tive, but may serve as an introduction.
Characteristics of 4D SQL
+-------------------------------------+--------------------------------------+---+
| Characteristics | | |
| | | |
| | Alternative | |
| | | |
| | Note | |
| | | |
+-------------------------------------+--------------------------------------+---+
| INTEGER | | |
| | | |
| | Modify the SQL to use INT. | |
| | | |
| | INT is the supported integer type in | |
| | 4Dv12.0. | |
| | | |
| CHAR | | |
| | | |
| | Use VARCHAR instead. | |
| | | |
| | Unsupported in 4Dv12.0 | |
| | | |
| UNION | | |
| | | |
| | Unsupported. Make separate queries. | |
| | | |
| | Unsupported in 4Dv12.0 | |
| | | |
| SELECT 1 + 1; | | |
| | | |
| | SELECT 1 + 1 FROM _USER_SCHEMAS; | |
| | | |
| | FROM is required | |
| | | |
| FLOAT | | |
| | | |
| | Cast the FLOAT value into a FLOAT or | |
| | STRING, with an SQL 4D function | |
| | (CAST, ROUND, TRUNC or TRUNCATE) | |
| | | |
| | Unsupported in current versions of | |
| | the PDO_4D driver | |
| | | |
| Strong typing | | |
| | | |
| | Take care your SQL query, or your | |
| | PHP code provides data with the | |
| | expected type | |
| | | |
| | One must provide the right type | |
| | that 4D expect. One can't insert '1' | |
| | (as a string) in an INTEGER column. | |
| | | |
|PDO.execute(row)(3) : only works if | | |
|all the table's column are of type | | |
|TEXT or VARCHAR | | |
| | | |
| | Use the prepared statements, and use | |
| | the right types. | |
| | | |
| | The PDO extension cast all values | |
| | through execute() as string, and | |
| | expect the SQL database to parse the | |
| | values. | |
| | | |
| SELECT NULL FROM TABLE | | |
| | | |
| | Do not use NULL constants. Extract | |
| | them from the table | |
| | | |
| | It is not allowed to use the NULL | |
| | constant in the select list | |
| | | |
| SELECT * FROM TABLE WHERE 1 | | |
| | | |
| | Use WHERE 1 = 1 | |
| | | |
| | A constant can't be used in a WHERE | |
| | clause | |
| | | |
| SHOW TABLES | | |
| | | |
| | Use system tables | |
| | | |
| | The list of tables, schemas, index, | |
| | etc. are in these system tables : | |
| | _USER_TABLES, _USER_COLUMNS, | |
| | _USER_INDEXES, _USER_CONSTRAINTS, | |
| | _USER_IND_COLUMNS, _USER_CONS_COL- | |
| | UMNS, and _USER_SCHEMAS. | |
| | | |
| SQL structure delimiter | | |
| | | |
| | Use the following function to pro- | |
| | tect SQL elements: function | |
| | sqlEscapeElement(elem) { return '[' | |
| | . str_replace(']',']]', $elem) . | |
| | ']'; } | |
| | | |
| | To escape SQL elements names | |
| | (tables, fields, users, groups, | |
| | schema, primary key, etc.), the | |
| | whole identifier must be between | |
| | square brackets, and the closing | |
| | brackets ']' must be doubled. | |
| | | |
+-------------------------------------+--------------------------------------+---+
PHP Documentation Group SQL-ACCEPTABLE-BY-4D(3)