02-26-2009
quirkasaurus,
Thanks for your reply. What I would like to do is to take the two sql files and the directory and write a piece of code that reads the two sql files and creates a directory tree.
About the code in one.sql we have a create table file statement plus so many insert to commands and in two.sql we have a create file gallery command with again some insert to.
(which the values will be separated by comma)
Now as my first step, I need to write code to create the directories from "two.sql". Please help me with this.
Thanks in advance!
Last edited by tezarin; 02-26-2009 at 12:41 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi...
Can any1 help me by telling me the way to create multiple directories using single command....
to create 1 directory.. mkdir is used.... :D
but how to create multiple direcs. like 4 direc.
i tried ....
$ mkdir a; mkdir b; mkdir c; mkdir d
But its 4 commands in a single... (3 Replies)
Discussion started by: abishekmag
3 Replies
2. Shell Programming and Scripting
Hi ,
I 'm trying to check if multiple directories exist on a server, if not create the missing ones and print " creating missing directory.
how to write this in a simple script, I have made my code complex
if ; then
taskStatus="Schema extract directory exists, checking if SQL,Count and... (7 Replies)
Discussion started by: ramky79
7 Replies
3. Shell Programming and Scripting
Hi,
I have a file in which I have database information along with 1 SELECT statement. Only 1 statement would be there. I want to grep this SELECT STATEMENT only and write into a separate file.
Input File format:
Database_Name:<database>
Schema_Name:<schema>
Table_Name:<table>
Select *... (3 Replies)
Discussion started by: ustechie
3 Replies
4. Shell Programming and Scripting
Can someone help me on creating a script that will manage/create a csv file from Pl/Sql using UNIX?Any advice is welcome,thank you so much,:) (2 Replies)
Discussion started by: Atrap
2 Replies
5. Programming
this is my issue.
4 parameters are passed from korn shell to sql script.
parameter_1= varchar2 datatype or no value entered my user.
parameter_2= number datatype or no value entered my user.
parameter_3= number datatype or no value entered my user.
parameter_4= number datatype or no... (5 Replies)
Discussion started by: megha2525
5 Replies
6. Shell Programming and Scripting
Hello. My latest project has me with the need for the following script. Basically, any directory that includes a .jpg file needs to also have a ".picture" file created (if it doesn't exist). Here's an example of what I need.
/mnt/user/Pictures/2011/Hawaii - 2011/.picture... (11 Replies)
Discussion started by: Davinator
11 Replies
7. Shell Programming and Scripting
Hi,
On server there is an one folder . which contains sub folder
Eg - TEST folder contains
test1, test2, execr ,tt (folder). also includes some text file like abc.txt psp.txt gg.log.
here iwant to create tgz file for all the folders and file in one time.
I know the command... (1 Reply)
Discussion started by: aish11
1 Replies
8. Shell Programming and Scripting
Hi all.
This is my first post on this forum. I've previously found great help in the huge knowledgebase that is here, but this time I have not been able to find a solution to my problem.
I have a large text file that looks like this:
typedef struct ABC_struct_nbr1_ {
char attr1; /*... (0 Replies)
Discussion started by: Yagi Uda
0 Replies
9. Shell Programming and Scripting
Hi,
Need help ...I want to create multiple directories in different /file systems using for loop..eg.../ORCL_data01/oradata/orcl/ctl.
../ORCL_data01/oradata/orcl/data.
../ORCL_data01/oradata/orcl/redo.
Script :-
=========
for dir in `ls -d... (8 Replies)
Discussion started by: Linux6.5
8 Replies
10. Shell Programming and Scripting
In the bash below I am trying to create sub-directories inside a directory from files with specific .bam extensions. There may be more then one $RDIR ing the directory and the .bam file(s) are trimmed (removing the extension and IonCode_0000_) and the result is the folder name that is saved in... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT PHP
db2_num_fields
DB2_NUM_FIELDS(3) 1 DB2_NUM_FIELDS(3)
db2_num_fields - Returns the number of fields contained in a result set
SYNOPSIS
int db2_num_fields (resource $stmt)
DESCRIPTION
Returns the number of fields contained in a result set. This is most useful for handling the result sets returned by dynamically generated
queries, or for result sets returned by stored procedures, where your application cannot otherwise know how to retrieve and use the
results.
PARAMETERS
o $stmt
- A valid statement resource containing a result set.
RETURN VALUES
Returns an integer value representing the number of fields in the result set associated with the specified statement resource. Returns
FALSE if the statement resource is not a valid input value.
EXAMPLES
Example #1
Retrieving the number of fields in a result set
The following example demonstrates how to retrieve the number of fields returned in a result set.
<?php
$sql = "SELECT id, name, breed, weight FROM animals ORDER BY breed";
$stmt = db2_prepare($conn, $sql);
db2_execute($stmt, $sql);
$columns = db2_num_fields($stmt);
echo "There are {$columns} columns in the result set.";
?>
The above example will output:
There are 4 columns in the result set.
SEE ALSO
db2_execute(3), db2_field_display_size(3), db2_field_name(3), db2_field_num(3), db2_field_precision(3), db2_field_scale(3),
db2_field_type(3), db2_field_width(3).
PHP Documentation Group DB2_NUM_FIELDS(3)