CREATE TABLE syntax question
Posted in 2016
Topics: Storage & Space Management
Good day Informix gurus,
Given the following statement
CREATE TABLE tfa_imag_pdf
(
Invoice_id integer,
pdf_image blob,
pdf_name char(100)
) IN vr_dbs1 EXTENT SIZE 200 NEXT SIZE 50
PUT image_pdf IN ( hi_use_sbs1 ) ( EXTENT SIZE 30, LOG, KEEP ACCESS
TIME )
LOCK MODE row ;
What I am trying to do is put the data for invoice_id and pdf_name columns
into my vr_dbs1 dbspace and put the pdf_image data into the hi_use_sbs1
sbspace.
By the same token, if possible, I would also like to specify a first and
next extent size for the vr_dbs1 storage option and an extent size for the
hi_use_dbs1 storage option.
I am currently running IDS v12.10.xC6 on SLES.
FYI
In reading the CREATE TABLE syntax in the SQL Syntax manual, it seems
to me that the syntax show above is correct; but I keep getting a syntax
error. In the various iterations that I have tried (so far), the only time
I do not get a syntax error is if I omit the IN vr_dbs1 EXTENT SIZE 200
NEXT SIZE 50 part.
Can anyone in our great community please show me the way
Thank you in advance for your lights.
Au plaisir, / Best Regards,
_____
Daniel Dansereau
Systèmes LogikInfo Inc.
<mailto:daniel.dansereau@logikinfo.com> daniel.dansereau@logikinfo.com
Tel: (514) 225-4159 x1121 / Mobile: (514) 262-3166 / Fax: (514) 426-0499
Devez-vous vraiment imprimer ce courriel ? Pensons environnement... - Do you
really need to print this e-mail ? Think environmentally...
Cette transmission est destinée à l'usage exclusif de la personne ou
entreprise à laquelle elle est adressée et peut contenir de l'information
privilégiée et confidentielle. Si ce document est lu par toute autre
personne que le destinataire ou celle responsable de le lui livrer, soyez
par les présentes avisé(e) que toute divulgation, distribution ou copie du
contenu de cette transmission est strictement interdite. Si vous avez reçu
cette transmission par erreur, veuillez nous en aviser immédiatement en
répondant à l'expéditeur; de plus, veuillez aussitôt effacer la dite
transmission de votre ordinateur. Nous vous remercions à l'avance de votre
collaboration.
This transmission is intended for the sole use of the individual and/or
entity to whom it is addressed, and may contain information and/or
attachments that are privileged, confidential and exempt from disclosure
under applicable law. If the reader of this transmission is not the intended
recipient, you are hereby notified that any disclosure, dissemination,
distribution, duplication or the taking of any action in reliance on the
contents of this transmission by someone other than the intended addressee
or its designated agent is strictly prohibited. If you have received this
transmission in error, please notify us by replying to the sender
immediately and delete the transmission from your computer. We appreciate
your collaboration
Move the EXTENT SIZE and NEXT SIZE clauses to after the PUT clause:
CREATE TABLE tfa_imag_pdf
(
Invoice_id integer,
pdf_image blob,
pdf_name char(100)
) IN vr_dbs1
PUT image_pdf IN ( hi_use_sbs1 )
( EXTENT SIZE 30, LOG, KEEP ACCESS TIME )
EXTENT SIZE 200 NEXT SIZE 50
LOCK MODE row ;
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Wed, Mar 30, 2016 at 2:41 PM, Daniel Dansereau <
Daniel.Dansereau@logikinfo.com> wrote:
> Good day Informix gurus,
>
> Given the following statement
>
> CREATE TABLE tfa_imag_pdf>
> (
>
> Invoice_id integer,
>
> pdf_image blob,
>
> pdf_name char(100)
>
> ) IN vr_dbs1 EXTENT SIZE 200 NEXT SIZE 50
>
> PUT image_pdf IN ( hi_use_sbs1 ) ( EXTENT SIZE 30, LOG, KEEP ACCESS
> TIME )
>
> LOCK MODE row ;
>
> What I am trying to do is put the data for invoice_id and pdf_name columns
> into my vr_dbs1 dbspace and put the pdf_image data into the hi_use_sbs1
> sbspace.
>
> By the same token, if possible, I would also like to specify a first and
> next extent size for the vr_dbs1 storage option and an extent size for the
> hi_use_dbs1 storage option.
>
> I am currently running IDS v12.10.xC6 on SLES.
>
> FYI In reading the CREATE TABLE syntax in the SQL Syntax manual, it seems
> to me that the syntax show above is correct; but I keep getting a syntax
> error. In the various iterations that I have tried (so far), the only time
> I do not get a syntax error is if I omit the IN vr_dbs1 EXTENT SIZE 200
> NEXT SIZE 50 part.
>
> Can anyone in our great community please show me the way
>
> Thank you in advance for your lights.
>
> Au plaisir, / Best Regards,
>
> _____
>
> Daniel Dansereau
>
> Systèmes LogikInfo Inc.
>
> <mailto:daniel.dansereau@logikinfo.com> daniel.dansereau@logikinfo.com
>
> Tel: (514) 225-4159 x1121 / Mobile: (514) 262-3166 / Fax: (514) 426-0499
>
> Devez-vous vraiment imprimer ce courriel ? Pensons environnement... - Do
> you
> really need to print this e-mail ? Think environmentally...
>
> Cette transmission est destinée à l'usage exclusif de la personne ou
> entreprise à laquelle elle est adressée et peut contenir de l'information
> privilégiée et confidentielle. Si ce document est lu par toute autre
> personne que le destinataire ou celle responsable de le lui livrer, soyez
> par les présentes avisé(e) que toute divulgation, distribution ou copie du
> contenu de cette transmission est strictement interdite. Si vous avez reçu
> cette transmission par erreur, veuillez nous en aviser immédiatement en
> répondant à l'expéditeur; de plus, veuillez aussitôt effacer la dite
> transmission de votre ordinateur. Nous vous remercions à l'avance de votre
> collaboration.
>
> This transmission is intended for the sole use of the individual and/or
> entity to whom it is addressed, and may contain information and/or
> attachments that are privileged, confidential and exempt from disclosure
> under applicable law. If the reader of this transmission is not the
> intended
> recipient, you are hereby notified that any disclosure, dissemination,
> distribution, duplication or the taking of any action in reliance on the
> contents of this transmission by someone other than the intended addressee
> or its designated agent is strictly prohibited. If you have received this
> transmission in error, please notify us by replying to the sender
> immediately and delete the transmission from your computer. We appreciate
> your collaboration
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a113ee8684d2736052f48d00d
Ahh, you have a typo in your post. Assuming the BLOB column name should be
pdf_image, then the DDL should be:
CREATE TABLE tfa_imag_pdf
(
Invoice_id integer,
pdf_image blob,
pdf_name char(100)
) IN vr_dbs1
PUT pdf_image IN ( hi_use_sbs1 )
( EXTENT SIZE 30, LOG, KEEP ACCESS TIME )
EXTENT SIZE 200 NEXT SIZE 50
LOCK MODE row ;
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Wed, Mar 30, 2016 at 3:03 PM, Art Kagel <art.kagel@gmail.com> wrote:
> Move the EXTENT SIZE and NEXT SIZE clauses to after the PUT clause:
>
> CREATE TABLE tfa_imag_pdf
> (
> Invoice_id integer,
> pdf_image blob,
> pdf_name char(100)
> ) IN vr_dbs1
> PUT image_pdf IN ( hi_use_sbs1 )
> ( EXTENT SIZE 30, LOG, KEEP ACCESS TIME )
> EXTENT SIZE 200 NEXT SIZE 50
> LOCK MODE row ;>
> Art
>
>
> Art S. Kagel, President and Principal Consultant
> ASK Database Management
> www.askdbmgt.com
>
> Blog: http://informix-myview.blogspot.com/
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
> and do not reflect on the IIUG, nor any other organization with which I am
> associated either explicitly, implicitly, or by inference. Neither do
> those opinions reflect those of other individuals affiliated with any
> entity with which I am affiliated nor those of the entities themselves.
>
>
> On Wed, Mar 30, 2016 at 2:41 PM, Daniel Dansereau <
> Daniel.Dansereau@logikinfo.com> wrote:
>
>> Good day Informix gurus,
>>
>> Given the following statement
>>
>> CREATE TABLE tfa_imag_pdf>>
>> (
>>
>> Invoice_id integer,
>>
>> pdf_image blob,
>>
>> pdf_name char(100)
>>
>> ) IN vr_dbs1 EXTENT SIZE 200 NEXT SIZE 50
>>
>> PUT image_pdf IN ( hi_use_sbs1 ) ( EXTENT SIZE 30, LOG, KEEP ACCESS
>> TIME )
>>
>> LOCK MODE row ;
>>
>> What I am trying to do is put the data for invoice_id and pdf_name columns
>> into my vr_dbs1 dbspace and put the pdf_image data into the hi_use_sbs1
>> sbspace.
>>
>> By the same token, if possible, I would also like to specify a first and
>> next extent size for the vr_dbs1 storage option and an extent size for the
>> hi_use_dbs1 storage option.
>>
>> I am currently running IDS v12.10.xC6 on SLES.
>>
>> FYI In reading the CREATE TABLE syntax in the SQL Syntax manual, it seems
>> to me that the syntax show above is correct; but I keep getting a syntax
>> error. In the various iterations that I have tried (so far), the only time
>> I do not get a syntax error is if I omit the IN vr_dbs1 EXTENT SIZE 200
>> NEXT SIZE 50 part.
>>
>> Can anyone in our great community please show me the way
>>
>> Thank you in advance for your lights.
>>
>> Au plaisir, / Best Regards,
>>
>> _____
>>
>> Daniel Dansereau
>>
>> Systèmes LogikInfo Inc.
>>
>> <mailto:daniel.dansereau@logikinfo.com> daniel.dansereau@logikinfo.com
>>
>> Tel: (514) 225-4159 x1121 / Mobile: (514) 262-3166 / Fax: (514) 426-0499
>>
>> Devez-vous vraiment imprimer ce courriel ? Pensons environnement... - Do
>> you
>> really need to print this e-mail ? Think environmentally...
>>
>> Cette transmission est destinée à l'usage exclusif de la personne ou
>> entreprise à laquelle elle est adressée et peut contenir de l'information
>> privilégiée et confidentielle. Si ce document est lu par toute autre
>> personne que le destinataire ou celle responsable de le lui livrer, soyez
>> par les présentes avisé(e) que toute divulgation, distribution ou copie du
>> contenu de cette transmission est strictement interdite. Si vous avez reçu
>> cette transmission par erreur, veuillez nous en aviser immédiatement en
>> répondant à l'expéditeur; de plus, veuillez aussitôt effacer la dite
>> transmission de votre ordinateur. Nous vous remercions à l'avance de votre
>> collaboration.
>>
>> This transmission is intended for the sole use of the individual and/or
>> entity to whom it is addressed, and may contain information and/or
>> attachments that are privileged, confidential and exempt from disclosure
>> under applicable law. If the reader of this transmission is not the
>> intended
>> recipient, you are hereby notified that any disclosure, dissemination,
>> distribution, duplication or the taking of any action in reliance on the
>> contents of this transmission by someone other than the intended addressee
>> or its designated agent is strictly prohibited. If you have received this
>> transmission in error, please notify us by replying to the sender
>> immediately and delete the transmission from your computer. We appreciate
>> your collaboration
>>
>>
>>
>>
*******************************************************************************
>> Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>>
>
--047d7bd76bea9b0aa4052f48d5c2