Subject Re: [IBO] TIB_DataPump
Author Arn
----- Original Message -----
From: Alan McDonald
To: IBObjects@yahoogroups.com
Sent: Saturday, February 28, 2004 11:03 AM
Subject: RE: [IBO] TIB_DataPump


> There is:
> CREATE TABLE SOCI (
> MYCODE D_GUID /* VARCHAR(36) NOT NULL */,
> COGNOME COGNOME /* VARCHAR(30) */,
> NOME NOME /* VARCHAR(20) */,
> TITOLO TITOLO /* VARCHAR(8) */,
> INDIRIZZO INDIRIZZO /* VARCHAR(50) */,

can I see the full definition? including contraints and indexes?
There :

/******************************************************************************/
/**** Generated by IBExpert 28/02/04 11.22.18 ****/
/******************************************************************************/

SET SQL DIALECT 3;

SET NAMES NONE;



/******************************************************************************/
/**** Tables ****/
/******************************************************************************/

CREATE TABLE SOCI (
MYCODE D_GUID /* VARCHAR(36) NOT NULL */,
COGNOME COGNOME /* VARCHAR(30) */,
NOME NOME /* VARCHAR(20) */,
TITOLO TITOLO /* VARCHAR(8) */,
INDIRIZZO INDIRIZZO /* VARCHAR(50) */,
CAP CAP /* VARCHAR(8) */,
CITTA CITTA /* VARCHAR(50) */,
CODICEFISCALE CODICEFISCALE /* VARCHAR(16) */,
DATA_INIZIO_COLLABORAZIONE DATA_ESTESA /* DATE */,
DATA_NASCITA DATA_ESTESA /* DATE */,
DATA_ISCRIZIONE DATA_ESTESA /* DATE */,
PROVINCIA PROVINCIA /* VARCHAR(2) */,
NOTE MILLE /* VARCHAR(1000) */,
ZONA INDIRIZZO /* VARCHAR(50) */,
LUOGONASCITA CITTA /* VARCHAR(50) */,
INTENZIONE_SPOSARSI BOOL /* CHAR(1) 1 NOT NULL */,
DATA_MATRIMONIO DATA /* DATE */,
ISCRIZIONE_COLLOCAMENTO BOOL /* CHAR(1) 1 NOT NULL */,
PROFESSIONE_PADRE VENTI /* VARCHAR(20) */,
PROFESSIONE_MADRE VENTI /* VARCHAR(20) */,
PRECEDENTI_PENALI BOOL /* CHAR(1) 1 NOT NULL */,
MILITARE BOOL /* CHAR(1) 1 NOT NULL */,
MALATTIE_PROFESSIONALI VENTI /* VARCHAR(20) */,
PORTA_OCCHIALI BOOL /* CHAR(1) 1 NOT NULL */,
PORTA_LENTI_CONTATTO BOOL /* CHAR(1) 1 NOT NULL */,
STUDI VENTI /* VARCHAR(20) */,
AUTO_PROPRIA BOOL /* CHAR(1) 1 NOT NULL */,
ESPERIENZE_LAVORATIVE NOTECORTE /* VARCHAR(100) */,
MOTIVO_LICENZIAMENTO NOTECORTE /* VARCHAR(100) */,
GIORNO_RIPOSO DIECI /* VARCHAR(10) */,
MATTINA BOOL /* CHAR(1) 1 NOT NULL */,
MATTINA_DALLE ORA /* TIME */,
MATTINA_ALLE ORA /* TIME */,
POMERIGGIO BOOL /* CHAR(1) 1 NOT NULL */,
POMERIGGIO_DALLE ORA /* TIME */,
POMERIGGIO_ALLE ORA /* TIME */,
SABATO BOOL /* CHAR(1) 1 NOT NULL */,
DOMENICA BOOL /* CHAR(1) 1 NOT NULL */,
STATUS_SOCIO TIPOPAGAMENTO /* VARCHAR(20) */,
SOSPESO_DAL DATA /* DATE */,
SOSPESO_AL DATA /* DATE */,
FERIE_DAL DATA /* DATE */,
FERIE_AL DATA /* DATE */,
CAMICE BOOL /* CHAR(1) 1 NOT NULL */,
CUFFIA BOOL /* CHAR(1) 1 NOT NULL */,
LIBRETTO BOOL /* CHAR(1) 1 NOT NULL */,
EQUIPAGGIAMENTO TRENTA /* VARCHAR(30) */,
DATA_CONTROLLO DATA /* DATE */,
ALTEZZA QUANTITA /* NUMERIC(9,2) 1 NOT NULL */ NOT NULL,
TAGLIA INTERI_PICCOLI /* SMALLINT 1 NOT NULL */ NOT NULL,
PESO INTERI_PICCOLI /* SMALLINT 1 NOT NULL */ NOT NULL,
TESSERA_SANITARIA BOOL /* CHAR(1) 1 NOT NULL */ NOT NULL,
DATA_SCADENZA_TESSERA DATA /* DATE */,
SESSO UNO /* VARCHAR(1) */,
ETA INTERI_PICCOLI /* SMALLINT 1 NOT NULL */ NOT NULL,
GIUDIZIO SEDICI /* VARCHAR(16) */,
DA_RICHIAMARE BOOL /* CHAR(1) 1 NOT NULL */ NOT NULL
);





/******************************************************************************/
/**** Primary Keys ****/
/******************************************************************************/

ALTER TABLE SOCI ADD CONSTRAINT PK_SOCI PRIMARY KEY (MYCODE);


/******************************************************************************/
/**** Indices ****/
/******************************************************************************/

CREATE INDEX XCOGNOMESOCI ON SOCI (COGNOME, NOME);


/******************************************************************************/
/**** Triggers ****/
/******************************************************************************/


SET TERM ^ ;




/* Trigger: SOCI_BIU0 */
CREATE TRIGGER SOCI_BIU0 FOR SOCI
ACTIVE BEFORE INSERT OR UPDATE POSITION 0
AS
begin
new.eta = coalesce( ( current_date - new.data_nascita ) / 365, 0 );
end
^


SET TERM ; ^

That's all.

Andy thanks.

Ciao
Arnaldo

___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !




------------------------------------------------------------------------------

Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/IBObjects/

b.. To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]