10-25-2010
I think it looks good. I'm going to try this.
thanks!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi-
I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment...
I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Discussion started by: rajagavini
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,I have a single sql file containing many create table ddl's.Example:
CREATE TABLE sec_afs
(
rpt_per_typ_c char(1) NOT NULL,
rpt_per_typ_t varchar(20) NULL,
LOCK ALLPAGES
go
EXEC sp_primarykey 'sec_afs', rpt_per_typ_c
go
GRANT SELECT ON sec_afs TO developer_read_only... (5 Replies)
Discussion started by: smarter_aries
5 Replies
3. Programming
Is there anyway to spool my select statement into spool files of max 10000 records each?
eg I have a select statement that will return 45000 records.
A normal spool command will output the 45000 into just one spool file.
How can I make sqlplus do this?
00001 - 10000 records --- spool... (3 Replies)
Discussion started by: Leion
3 Replies
4. UNIX for Dummies Questions & Answers
Hi guys,
I am new on here, I have a function in oracle that returns a specific value:
create or replace
PACKAGE BODY "CTC_ASDGET_SCHED" AS
FUNCTION FN_ASDSCHEDULE_GET
RETURN VARCHAR2
AS
BEGIN
DECLARE
ASDSchedule varchar2(6);
ASDComplete... (1 Reply)
Discussion started by: reptile
1 Replies
5. Shell Programming and Scripting
Hi All,
Please help me to write a shell script to execute the below sql query.
select c.account_no,b.bill_no,a.pay_type,(b.total_due + b.recvd + b.adjusted + b.disputed + b.transferred) as amt_not_billed,d.cash_on_delivery,
(select j.bill_no from
billinfo_T y,
bill_t j
where... (1 Reply)
Discussion started by: girish.raos
1 Replies
6. Shell Programming and Scripting
I am using HP-UX:
I have written a ksh script where I need to connect to sqlplus and execute few sql scripts. Part of this code is -
sqlplus user/temp1234 <<!
set serverout on
set feedback off
set pages 1000
set colsep ,
set echo off
spool /home/supp1/pks/output.csv... (8 Replies)
Discussion started by: Sriranga
8 Replies
7. Shell Programming and Scripting
Hi,
I'm trying to build a shell script that reads a set of accounts from a file. For each account I need to perform a set of sql queries. So I have a loop with a set of sqlplus connections to retrieved my data.
Is it possible to have a single sqlplus connection before entering the loop and... (4 Replies)
Discussion started by: lsantacana
4 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. UNIX and Linux Applications
using sqlplus I want to execute a .sql script that has dbms_output statments in rhe script. I want to write the dbms_output statements from .sql file to a log file. is this possible. thanks
any help would be appreciated
:wall: (1 Reply)
Discussion started by: TRS80
1 Replies
10. UNIX for Beginners Questions & Answers
Hello ,
Im calling every single file inside my script like 1.sql,2.sql so on it looks so tedious. I want to replace with for loop where every file gets executed. When i use for loop im getting errorUnexpected EOF] , can anyone please help me out in this..
How i can use for loop to invoke my... (6 Replies)
Discussion started by: preethi87
6 Replies
LEARN ABOUT PHP
str_word_count
STR_WORD_COUNT(3) 1 STR_WORD_COUNT(3)
str_word_count - Return information about words used in a string
SYNOPSIS
mixed str_word_count (string $string, [int $format], [string $charlist])
DESCRIPTION
Counts the number of words inside $string. If the optional $format is not specified, then the return value will be an integer representing
the number of words found. In the event the $format is specified, the return value will be an array, content of which is dependent on the
$format. The possible value for the $format and the resultant outputs are listed below.
For the purpose of this function, 'word' is defined as a locale dependent string containing alphabetic characters, which also may contain,
but not start with "'" and "-" characters.
PARAMETERS
o $string
- The string
o $format
- Specify the return value of this function. The current supported values are:
o 0 - returns the number of words found
o 1 - returns an array containing all the words found inside the $string
o 2 - returns an associative array, where the key is the numeric position of the word inside the $string and the value is the
actual word itself
o $charlist
- A list of additional characters which will be considered as 'word'
RETURN VALUES
Returns an array or an integer, depending on the $format chosen.
CHANGELOG
+--------+--------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+--------------------------------+
| 5.1.0 | |
| | |
| | Added the $charlist parameter |
| | |
+--------+--------------------------------+
EXAMPLES
Example #1
A str_word_count(3) example
<?php
$str = "Hello fri3nd, you're
looking good today!";
print_r(str_word_count($str, 1));
print_r(str_word_count($str, 2));
print_r(str_word_count($str, 1, 'aaac3'));
echo str_word_count($str);
?>
The above example will output:
Array
(
[0] => Hello
[1] => fri
[2] => nd
[3] => you're
[4] => looking
[5] => good
[6] => today
)
Array
(
[0] => Hello
[6] => fri
[10] => nd
[14] => you're
[29] => looking
[46] => good
[51] => today
)
Array
(
[0] => Hello
[1] => fri3nd
[2] => you're
[3] => looking
[4] => good
[5] => today
)
7
SEE ALSO
explode(3), preg_split(3), split(3), count_chars(3), substr_count(3).
PHP Documentation Group STR_WORD_COUNT(3)