Sponsored Content
Top Forums Shell Programming and Scripting How to create a C structure using table description. Post 302370953 by ehari on Friday 13th of November 2009 02:27:15 AM
Old 11-13-2009
How to create a C structure using table description.

There is table 'DEPT' in the database with the following desciption:

Name Null? Type
------- -------- ------------------------
DEPTNO NOT NULL NUMBER(2)
DNAME NULL VARCHAR2(14)
LOC NULL VARCHAR2(13)

Using shell script, I need to create a structure for the above table as follows and put this structure in dept.h file.
struct dept
{
int deptno;
char dname[15];
char loc[14];
};

Please help how this is created using shell script.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help to Create this file format structure

This data comes form the table and exported into the file in this format File1 Format weboffercode1,sourcecode1,1,1,1,1,1,1 weboffercode1,sourcecode2,1,1,1,1,1,1 weboffercode1,sourcecode1,1,1,1,1,1,1 weboffercode1,sourcecode3,1,1,1,1,1,1 weboffercode1,sourcecode3,1,1,1,1,1,1 ... (4 Replies)
Discussion started by: enigma_83
4 Replies

2. Shell Programming and Scripting

How to create a directory structure with getting input from a file.

Hi How to create a directory structure with getting input from a file. I have file in that following lines are written. ./activemq-4.1.2/activemq-core-4.1.2.jar ./activemq-4.1.2/backport-util-concurrent-2.1.jar ./camel-1.4.0/apache-camel-1.4.0.jar ./camel-1.4.0/lib/activation-1.1.jar... (12 Replies)
Discussion started by: itsjoy2u
12 Replies

3. UNIX and Linux Applications

create table via stored procedure (passing the table name to it)

hi there, I am trying to create a stored procedure that i can pass the table name to and it will create a table with that name. but for some reason it creates with what i have defined as the variable name . In the case of the example below it creates a table called 'tname' for example ... (6 Replies)
Discussion started by: rethink
6 Replies

4. UNIX for Dummies Questions & Answers

find mv and create directory structure

Hi there, I'm trying to pull all my flacs out of my Music collection. I can do it with following command find b/ -name *.flac -exec mv {} flac/ \; which works great except it moves all the flac files to the flac folder. I want it to recreate the original folder the flacs were found in and mv... (8 Replies)
Discussion started by: fistikuffs
8 Replies

5. Shell Programming and Scripting

Create Directory structure

Hello ; ) again Now I have my file like this : DIR2/DIR3 DIR2 DIR2/DIR3/DIR4/DIR5 I am looking for help to create a loop that will create the directory structure. I need something like this : If "DIR2" does not exist > Create IF "DIR2" exist already > check if onther "DIR"... (5 Replies)
Discussion started by: Aswex
5 Replies

6. Shell Programming and Scripting

Create a flat file and directory structure

Hi All, is there any work around to generate the file and directory structure like below at left side at Output? and exclude all file except .abc .txt Current Directory structure |-------------files |---------------Share |-----------------dir1 |-----------------dir2... (11 Replies)
Discussion started by: heros
11 Replies

7. UNIX and Linux Applications

Help in copying table structure to another table with constraints in Oracle

hi, i need to copy one table with data into another table, right now am using create table table1 as select * from table2 i want the constraints of table1 to be copied to table2 also , can anyone give me some solution to copy the constraints also, now am using oracle 10.2.0.3.0... (1 Reply)
Discussion started by: senkerth
1 Replies

8. Shell Programming and Scripting

Extract hive table structure

Hi, I need to extract only the create table structure with columns alone. for eg hive_table show create table hive_table: create table hive_table(id number,age number) OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat' LOCATION 'hdfs:/path/' I need only below ... (5 Replies)
Discussion started by: rohit_shinez
5 Replies

9. Shell Programming and Scripting

JSON structure to table form in awk, bash

Hello guys, I want to parse a JSON file in order to get the data in a table form. My JSON file is like this: { "document":{ "page": }, { "column": } ] }, { ... (6 Replies)
Discussion started by: Gescad
6 Replies
SLAPD-NULL(5)							File Formats Manual						     SLAPD-NULL(5)

NAME
slapd-null - Null backend to slapd SYNOPSIS
/etc/ldap/slapd.conf DESCRIPTION
The Null backend to slapd(8) is surely the most useful part of slapd: - Searches return success but no entries. - Compares return compareFalse. - Updates return success (unless readonly is on) but do nothing. - Binds other than as the rootdn fail unless the database option "bind on" is given. - The slapadd(8) and slapcat(8) tools are equally exciting. Inspired by the /dev/null device. CONFIGURATION
This slapd.conf option applies to the NULL backend database. That is, it must follow a "database null" line and come before any subsequent "database" lines. Other database options are described in the slapd.conf(5) manual page. bind <on/off> Allow binds as any DN in this backend's suffix, with any password. The default is "off". EXAMPLE
Here is a possible slapd.conf extract using the Null backend: database null suffix "cn=Nothing" bind on ACCESS CONTROL
The null backend does not honor any of the access control semantics described in slapd.access(5). FILES
/etc/ldap/slapd.conf default slapd configuration file SEE ALSO
slapd.conf(5), slapd(8), slapadd(8), slapcat(8). OpenLDAP 2012/04/23 SLAPD-NULL(5)
All times are GMT -4. The time now is 10:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy