Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How can I load data into 1 column of a table

2 posts in General Discussion Last posting was on 2011-05-27 18:14:48.0Z
tartampion Posted on 2011-05-25 16:26:51.0Z
Sender: 5ea.4ddbd416.1804289383@sybase.com
From: tartampion
Newsgroups: sybase.public.iq
Subject: How can I load data into 1 column of a table
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ddd2dcb.2871.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 25 May 2011 09:26:51 -0700
X-Trace: forums-1-dub 1306340811 10.22.241.41 (25 May 2011 09:26:51 -0700)
X-Original-Trace: 25 May 2011 09:26:51 -0700, 10.22.241.41
Lines: 29
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4372
Article PK: 246514

In IQ 15.2; is it possible to load data into one or two
columns of a table only ? consider that the rest of the
columns already have data in them.
My case is simple, I have for example; a table with 2
columns and add a column to it which naturally accepts null.
ri,pr_date, new_row
-- ----------------------- ---------
1 2010-12-06 00:00:00.000 NULL
2 2010-12-06 00:00:00.000 NULL
3 2010-12-06 00:00:00.000 NULL
4 2010-12-06 00:00:00.000 NULL

After such a modification I need to load data into the new
column:
LOAD TABLE tt
( new_row
)
FROM 'd:\temp\1.DAT'
DELIMITED by ','
ESCAPES OFF;
go
commit;
go

It fails as it tries to insert data starting at row 5 and as
columns 1 and 2 are not null the load fails.
Why such a load is not possible? It should be, therefore I
am doing something wrong. Please advise.
Tartampion.


tartampion Posted on 2011-05-27 18:14:48.0Z
Sender: 7166.4ddfe9bd.1804289383@sybase.com
From: tartampion
Newsgroups: sybase.public.iq
Subject: Re: How can I load data into 1 column of a table
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ddfea18.716f.1681692777@sybase.com>
References: <4ddd2dcb.2871.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 27 May 2011 11:14:48 -0700
X-Trace: forums-1-dub 1306520088 10.22.241.41 (27 May 2011 11:14:48 -0700)
X-Original-Trace: 27 May 2011 11:14:48 -0700, 10.22.241.41
Lines: 32
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4377
Article PK: 246517

Please ignore, I found the solution, it works by adding the
start row id clause to the load statement.
tartampion.

> In IQ 15.2; is it possible to load data into one or two
> columns of a table only ? consider that the rest of the
> columns already have data in them.
> My case is simple, I have for example; a table with 2
> columns and add a column to it which naturally accepts
> null. ri,pr_date, new_row
> -- ----------------------- ---------
> 1 2010-12-06 00:00:00.000 NULL
> 2 2010-12-06 00:00:00.000 NULL
> 3 2010-12-06 00:00:00.000 NULL
> 4 2010-12-06 00:00:00.000 NULL
>
> After such a modification I need to load data into the new
> column:
> LOAD TABLE tt
> ( new_row
> )
> FROM 'd:\temp\1.DAT'
> DELIMITED by ','
> ESCAPES OFF;
> go
> commit;
> go
>
> It fails as it tries to insert data starting at row 5 and
> as columns 1 and 2 are not null the load fails.
> Why such a load is not possible? It should be, therefore I
> am doing something wrong. Please advise.
> Tartampion.