Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dbaccess & length of statements

24 views
Skip to first unread message

Frank Wehrle

unread,
Jul 21, 2000, 3:00:00 AM7/21/00
to
Hi everyone

I am rather new to informix and I have a question I feel very silly to
ask, but anyway since I don't have much time here it goes:

I am trying to create Tables with dbaccess. Right now I haven't found a
way to type in more than 80 charactes per statement. The SQL generator
just cuts the line. I want to use SQL and not the tool since I am just
developing and somebody else is going to implement the real system. So I
figuered out it would be the best to create a setup.

I read the newsgroup, but all I could find was a hint to another tool,
that's helpfull for my developing environment, but does not really solve
my problem....

I hope I can give any help back to this group soon.... (As soon as I am
getting more known to informix....)

Frank


R Smith

unread,
Jul 21, 2000, 3:00:00 AM7/21/00
to
frank....@mediaaktiv.de (Frank Wehrle) wrote in
<397820AA...@mediaaktiv.de>:

Frank,

You should be able to develope whatever query you desire in
dbaccess. I don't know what you mean by cutting off the statement
at 80 characters. Granted, the 'editor' in dbaccess is lacking,
but you can use the editor of your choice. In dbaccess, choose 'Q'uery,
then 'U'se-editor, you will then be prompted for your editor of choice,
type in vi (if you have the environment variable DBEDIT=vi, it will
throw you into vi automatically).

Does this help?

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----

User 1

unread,
Jul 21, 2000, 3:00:00 AM7/21/00
to
In dbAccess, you should be able to edit the SQL statement in any editor.
Usually on UNIX it is vi and on NT it is notepad.

Check the menu for "Editor"

As far as using other tools is concerned, how does it affect your
developement effort. After all, the final goal is to send queries to the DB
and it should not matter if you use DBAccess or any other tool

"Frank Wehrle" <frank....@mediaaktiv.de> wrote in message
news:397820AA...@mediaaktiv.de...

Obnoxio The Clown

unread,
Jul 21, 2000, 3:00:00 AM7/21/00
to

From: RSm...@iiug.iiug.org (R Smith)

>
>You should be able to develope whatever query you desire in
>dbaccess. I don't know what you mean by cutting off the statement
>at 80 characters. Granted, the 'editor' in dbaccess is lacking,
>but you can use the editor of your choice. In dbaccess, choose 'Q'uery,
>then 'U'se-editor, you will then be prompted for your editor of choice,
>type in vi (if you have the environment variable DBEDIT=vi, it will
>throw you into vi automatically).

I tried a really long create table all on one line, and even though the
editor cut it off in the display, it still created the table fine...

> >I am rather new to informix and I have a question I feel very silly to
> >ask, but anyway since I don't have much time here it goes:
> >
> >I am trying to create Tables with dbaccess. Right now I haven't found a
> >way to type in more than 80 charactes per statement. The SQL generator
> >just cuts the line. I want to use SQL and not the tool since I am just
> >developing and somebody else is going to implement the real system. So I
> >figuered out it would be the best to create a setup.
> >
> >I read the newsgroup, but all I could find was a hint to another tool,
> >that's helpfull for my developing environment, but does not really solve
> >my problem....
> >
> >I hope I can give any help back to this group soon.... (As soon as I am
> >getting more known to informix....)
> >
> >Frank
> >
> >
>
>
>

>-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
>http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
>-----== Over 80,000 Newsgroups - 16 Different Servers! =-----

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Dennis Pimple

unread,
Jul 21, 2000, 3:00:00 AM7/21/00
to

--

Frank Wehrle <frank....@mediaaktiv.de> wrote in message
news:397820AA...@mediaaktiv.de...
> Hi everyone
>

> I am rather new to informix and I have a question I feel very silly to
> ask, but anyway since I don't have much time here it goes:
>
> I am trying to create Tables with dbaccess. Right now I haven't found a
> way to type in more than 80 charactes per statement. The SQL generator
> just cuts the line. I want to use SQL and not the tool since I am just
> developing and somebody else is going to implement the real system. So I
> figuered out it would be the best to create a setup.

> \

Just hit a return when you approach the end of the line. Most people type in
their code in logical lines:
select this, that, other
from tables
where ...

so they don't get close to the end of the line.

SQL is space independant, so you can write like:

select
this
, that,
the other

from tables

and get away with it.

Also remember, you can use the "Use-editor" menu option if you're a vi (or
other editor) expert and want to use it.

Carlos Benjamin

unread,
Jul 22, 2000, 3:00:00 AM7/22/00
to


--- Frank Wehrle <frank....@mediaaktiv.de>
> wrote:
>.....


>I am trying to create Tables with dbaccess. Right now I haven't found a
>way to type in more than 80 charactes per statement. The SQL generator
>just cuts the line.

Most folks don't try to write everything on one line. Try chopping things up like this.

Select field1,
field2,
field3,
.... etc.
From table,
table
Where condition
and condition

What you are seeing is the detestable Informix editor not working well with the TERM you have defined. It's not really worth trying to get the two to cooperate since any lines longer than 80 chars will scroll the beginning of the line off the screen anyway (if I remember correctly). The above is much more readable and easier to modify/debug.


>I want to use SQL and not the tool

By 'the tool' I assume you are making reference to dbaccess? Did you know that you can use dbaccess from the commandline without going into the menus? Is that what you'd prefer? You can also use Jonathan Leffler's sqlcmd utility.

> since I am just
>developing and somebody else is going to implement the real system. So I
>figuered out it would be the best to create a setup.
>

>I read the newsgroup, but all I could find was a hint to another tool,
>that's helpfull for my developing environment, but does not really solve
>my problem....

I'm not really sure you explained your problem well enough aside from the 80 char limitation.

>I hope I can give any help back to this group soon.... (As soon as I am
>getting more known to informix....)

Until then, some of us are accepting cash gifts. Or livestock.

==
Maintainer of the procrastinator's FAQ. Well, maybe tomorrow I will be.

_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

Art S. Kagel

unread,
Jul 24, 2000, 3:00:00 AM7/24/00
to
Carlos Benjamin wrote:
>
> --- Frank Wehrle <frank....@mediaaktiv.de>
> > wrote:
>[SNIP]

> >I hope I can give any help back to this group soon.... (As soon as I am
> >getting more known to informix....)
>
> Until then, some of us are accepting cash gifts. Or livestock.

Live livestock, please, my lawn is getting long. Oh, and no chickens!

Art S. Kagel

Carlos Benjamin

unread,
Jul 24, 2000, 3:00:00 AM7/24/00
to


--- "Art S. Kagel" <ka...@bloomberg.net>

Why's that? Someone get your goat?

>Oh, and no chickens!

Animalist!

>
>Art S. Kagel

Frank Wehrle

unread,
Jul 24, 2000, 3:00:00 AM7/24/00
to
> Thanks to you all...

I couldn't solve the problem though. DBaccess still cuts at 80 characters,
Using an editor doesn't help at all.
I wrote a java Application, that does all statements on the database with
jdbc and that works.

Frank

Obnoxio The Clown

unread,
Jul 24, 2000, 3:00:00 AM7/24/00
to

From: Frank Wehrle <frank....@mediaaktiv.de>

Oh sure. You're right and we're all wrong. And Informix is dumb enough to
sell a query tool that only takes queries that are 80 characters long.

Frank Wehrle

unread,
Jul 24, 2000, 3:00:00 AM7/24/00
to
I am not stupid and I know that it can't be the wanted behaviour for that
application, but still it doesn't work on my maschine. It may be installation
problems, problems with connection from WinNT client to SUN Database or
whatever, I have no Idea about a solution (except the workaround with my java
application). And believe me, I am not sitting here at 11:30 PM for fun or
because I have no better Idea of using my time.....

If you understood this in a way like "I am right and you are wrong..." I am
sorry for that.... It wasn't meant that way!

I really appreciate your help.
Frank

R. Mitchell

unread,
Jul 24, 2000, 3:00:00 AM7/24/00
to
As Carlos said, break the sql up into multiple lines.
CREATE TABLE mytable(
mycol integer,
mycol2 char(x),
mycol3 char(x),
etc.
) ;
Everything before the semicolon is processed as one "statement". It doesn't
matter if it is ten characters or 100.

--
R. Mitchell

"Frank Wehrle" <frank....@mediaaktiv.de> wrote in message

news:397CB76D...@mediaaktiv.de...

0 new messages