Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Using bash script : How to Import data from a dsv file into multiple tables in mysql Post 303030993 by steveo314 on Wednesday 20th of February 2019 10:04:13 AM
Old 02-20-2019
Do you have any experience with Perl?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Import data from compressed file

HI I need to import data from a file which is in comressed format but system doesn't have enough space to uncompress file Is there any way so that i can do import from compressed file. (4 Replies)
Discussion started by: ap_gore79
4 Replies

2. Shell Programming and Scripting

Converting tables of row data into columns of tables

I am trying to transpose tables listed in the format into format. Any help would be greatly appreciated. Input: test_data_1 1 2 90% 4 3 91% 5 4 90% 6 5 90% 9 6 90% test_data_2 3 5 92% 5 4 92% 7 3 93% 9 2 92% 1 1 92% ... Output:... (7 Replies)
Discussion started by: justthisguy
7 Replies

3. Shell Programming and Scripting

Data Import perl script

Hi, I have a requirement for creating a Perl Script which will perform Data Import process in an automated way and I am elaborating herewith : Section 1 ) - use the following command line format : "./import.pl -h hostname -p port -f datafile.txt" Section 2) datafile.txt will... (3 Replies)
Discussion started by: scott_apc
3 Replies

4. Shell Programming and Scripting

Reading data from multiple tables from Oracle DB

Hi , I want to read the data from 9 tables in oracle DB into 9 different files in the same connection instance (session). I am able to get data from one table to one file with below code : X=`sqlplus -s user/pwd@DB <<eof select col1 from table1; EXIT; eof` echo $X>myfile Can anyone... (2 Replies)
Discussion started by: net
2 Replies

5. Shell Programming and Scripting

Shell snip to import CSV data into BASH array

I have been trying to write a simple snip of bash shell code to import from 1 to 100 records into a BASH array. I have a CSV file that is structured like: record1,item1,item2,item3,item4,etc.,etc. .... (<= 100 items) record2,item1,item2,item3,item4,etc.,etc. .... (<= 100 items)... (5 Replies)
Discussion started by: dstrout
5 Replies

6. Web Development

mysql query for multiple columns from multiple tables in a DB

Say I have two tables like below.. status HId sName dName StartTime EndTime 1 E E 9:10 10:10 2 E F 9:15 10:15 3 G H 9:17 10:00 logic Id devName capacity free Line 1 E 123 34 1 2 E 345 ... (3 Replies)
Discussion started by: ilan
3 Replies

7. Shell Programming and Scripting

Bash script with python slicing on multiple data files

I have 2 files generated in linux that has common output and were produced across multiple hosts with the same setup/configs. These files do some simple reporting on resource allocation and user sessions. So, essentially, say, 10 hosts, with the same (2) system reporting in the files, so a... (0 Replies)
Discussion started by: jdubbz
0 Replies

8. Shell Programming and Scripting

Append data by looking up 2 tables for multiple files

I want to lookup values from two different tables based on common columns and append. The trick is the column to be looked up is not fixed and varies , so it has to be detected from the header. How can I achieve this at once, for multiple data files, but lookup tables fixed. The two lookup... (5 Replies)
Discussion started by: ritakadm
5 Replies

9. Shell Programming and Scripting

In PErl script: need to read the data one file and generate multiple files based on the data

We have the data looks like below in a log file. I want to generat files based on the string between two hash(#) symbol like below Source: #ext1#test1.tale2 drop #ext1#test11.tale21 drop #ext1#test123.tale21 drop #ext2#test1.tale21 drop #ext2#test12.tale21 drop #ext3#test11.tale21 drop... (5 Replies)
Discussion started by: Sanjeev G
5 Replies

10. Shell Programming and Scripting

Shell script automation using cron which query's MySQL Tables

What I have: I have a input.sh (script which basically connect to mysql-db and query's multiple tables to write back the output to output1.out file in a directory) note: I need to pass an integer (unique_id = anything b/w 1- 1000) next to the script everytime I run the script which generates... (3 Replies)
Discussion started by: kkpand
3 Replies
CUBRID_GET_DB_PARAMETER(3)						 1						CUBRID_GET_DB_PARAMETER(3)

cubrid_get_db_parameter - Returns the CUBRID database parameters

SYNOPSIS
array cubrid_get_db_parameter (resource $conn_identifier) DESCRIPTION
This function returns the CUBRID database parameters or it returns FALSE on failure. It returns an associative array with the values for the following parameters: o PARAM_ISOLATION_LEVEL o PARAM_LOCK_TIMEOUT o PARAM_MAX_STRING_LENGTH o PARAM_AUTO_COMMIT Database parameters +----------------------+---------------------------------------------------+ | Parameter | | | | | | | Description | | | | +----------------------+---------------------------------------------------+ |PARAM_ISOLATION_LEVEL | | | | | | | The transaction isolation level. | | | | | LOCK_TIMEOUT | | | | | | | CUBRID provides the lock timeout feature, which | | | sets the waiting time (in seconds) for the lock | | | until the transaction lock setting is allowed. | | | The default value of the lock_timeout_in_secs | | | parameter is -1, which means the application | | | client will wait indefinitely until the transac- | | | tion lock is allowed. | | | | | PARAM_AUTO_COMMIT | | | | | | | In CUBRID PHP, auto-commit mode is disabled by | | | default for transaction management. It can be set | | | by using cubrid_set_autocommit(3). | | | | +----------------------+---------------------------------------------------+ The following table shows the isolation levels from 1 to 6. It consists of table schema (row) and isolation level: Levels of Isolation Supported by CUBRID +--------------------------------------------------+---------------------------------------------------+ | Name | | | | | | | Description | | | | +--------------------------------------------------+---------------------------------------------------+ | SERIALIZABLE (6) | | | | | | | In this isolation level, problems concerning con- | | | currency (e.g. dirty read, non-repeatable read, | | | phantom read, etc.) do not occur. | | | | |REPEATABLE READ CLASS with REPEATABLE READ | | |INSTANCES (5) | | | | | | | Another transaction T2 cannot update the schema | | | of table A while transaction T1 is viewing table | | | A. Transaction T1 may experience phantom read for | | | the record R that was inserted by another trans- | | | action T2 when it is repeatedly retrieving a spe- | | | cific record. | | | | |REPEATABLE READ CLASS with READ COMMITTED | | |INSTANCES (or CURSOR STABILITY) (4) | | | | | | | Another transaction T2 cannot update the schema | | | of table A while transaction T1 is viewing table | | | A. Transaction T1 may experience R read (non- | | | repeatable read) that was updated and committed | | | by another transaction T2 when it is repeatedly | | | retrieving the record R. | | | | |REPEATABLE READ CLASS with READ UNCOMMITTED | | |INSTANCES (3) | | | | | | | Default isolation level. Another transaction T2 | | | cannot update the schema of table A while trans- | | | action T1 is viewing table A. Transaction T1 may | | | experience R' read (dirty read) for the record | | | that was updated but not committed by another | | | transaction T2. | | | | |READ COMMITTED CLASS with READ COMMITTED | | |INSTANCES (2) | | | | | | | Transaction T1 may experience A' read (non- | | | repeatable read) for the table that was updated | | | and committed by another transaction T2 while it | | | is viewing table A repeatedly. Transaction T1 may | | | experience R' read (non-repeatable read) for the | | | record that was updated and committed by another | | | transaction T2 while it is retrieving the record | | | R repeatedly. | | | | |READ COMMITTED CLASS with READ UNCOMMITTED | | |INSTANCES (1) | | | | | | | Transaction T1 may experience A' read (non- | | | repeatable read) for the table that was updated | | | and committed by another transaction T2 while it | | | is repeatedly viewing table A. Transaction T1 may | | | experience R' read (dirty read) for the record | | | that was updated but not committed by another | | | transaction T2. | | | | +--------------------------------------------------+---------------------------------------------------+ PARAMETERS
o $conn_identifier - The CUBRID connection. If the connection identifier is not specified, the last link opened by cubrid_connect(3) is assumed. RETURN VALUES
An associative array with CUBRID database parameters; on success. FALSE on failure. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 8.4.0 | | | | | | | Change LOCK_TIMEOUT to PARAM_LOCK_TIMEOUT, and | | | MAX_STRING_LENGTH to PARAM_MAX_STRING_LENGTH in | | | result. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 cubrid_get_db_parameter(3) example <?php printf("%-30s %s ", "CUBRID PHP Version:", cubrid_version()); printf(" "); $conn = cubrid_connect("localhost", 33088, "demodb"); if (!$conn) { die('Connect Error ('. cubrid_error_code() .')' . cubrid_error_msg()); } $db_params = cubrid_get_db_parameter($conn); while (list($param_name, $param_value) = each($db_params)) { printf("%-30s %s ", $param_name, $param_value); } printf(" "); $server_info = cubrid_get_server_info($conn); $client_info = cubrid_get_client_info(); printf("%-30s %s ", "Server Info:", $server_info); printf("%-30s %s ", "Client Info:", $client_info); printf(" "); $charset = cubrid_get_charset($conn); printf("%-30s %s ", "CUBRID Charset:", $charset); cubrid_disconnect($conn); ?> The above example will output: CUBRID PHP Version: 9.1.0.0001 PARAM_ISOLATION_LEVEL 3 LOCK_TIMEOUT -1 MAX_STRING_LENGTH 1073741823 PARAM_AUTO_COMMIT 1 Server Info: 9.1.0.0212 Client Info: 9.1.0 CUBRID Charset: iso8859-1 SEE ALSO
cubrid_set_db_parameter(3), cubrid_get_autocommit(3). PHP Documentation Group CUBRID_GET_DB_PARAMETER(3)
All times are GMT -4. The time now is 08:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy