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.

Autoincrement question

3 posts in General Discussion Last posting was on 2003-01-31 16:06:04.0Z
Ericrad Posted on 2003-01-30 23:51:21.0Z
From: EricRad
Date: Thu, 30 Jan 2003 18:51:21 -0500
Newsgroups: ianywhere.public.general
Subject: Autoincrement question
Message-ID: <F775819DCFBA858400830B3785256CBE.00830B6685256CBE@webforums>
Lines: 12
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:205
Article PK: 2024

Hi -

I'm importing some customer data and I need to "clean" it up. I load it
into a work table for this. I then need to unload the data into a flat file
and append it to the customers production table. The production table has
an 'ID' column that is autoincrement and unique.

How can I load this flat file into the table and have the autonumber be
gen'd?

Thanks
Eric


Robert Waywell Posted on 2003-01-31 13:50:16.0Z
From: "Robert Waywell" <rwaywell@ianywhere.com>
References: <F775819DCFBA858400830B3785256CBE.00830B6685256CBE@webforums>
Subject: Re: Autoincrement question
Date: Fri, 31 Jan 2003 08:50:16 -0500
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <KqeRUJTyCHA.254@forums.sybase.com>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: 172.31.143.74
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub ianywhere.public.general:202
Article PK: 2020

What version and build number?
With 8.x both LOAD TABLE and INPUT let you specify a column list when
loading the data. This means that you can exclude the autoincrement column
from your column list and as the data is loaded the default will populate
the autoincrement value.

As an FYI, the sybase.public.sqlanywhere.general newgroup is
specifically focused on ASA and the recommended location to post ASA
questions.

--
-----------------------------------------------
Robert Waywell
Sybase Adaptive Server Anywhere Developer - Version 8
Sybase Certified Professional

Sybase's iAnywhere Solutions

Please respond ONLY to newsgroup

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288

Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere
Developer Community at www.ianywhere.com/developer

<EricRad> wrote in message
news:F775819DCFBA858400830B3785256CBE.00830B6685256CBE@webforums...
> Hi -
>
> I'm importing some customer data and I need to "clean" it up. I load it
> into a work table for this. I then need to unload the data into a flat
file
> and append it to the customers production table. The production table has
> an 'ID' column that is autoincrement and unique.
>
> How can I load this flat file into the table and have the autonumber be
> gen'd?
>
> Thanks
> Eric
>


Ericrad Posted on 2003-01-31 16:06:04.0Z
From: EricRad
Date: Fri, 31 Jan 2003 11:06:04 -0500
Newsgroups: ianywhere.public.general
Subject: Re: Autoincrement question
Message-ID: <178893CDA2CA615C0058727385256CBF.005276DF85256CBF@webforums>
References: <F775819DCFBA858400830B3785256CBE.00830B6685256CBE@webforums> <KqeRUJTyCHA.254@forums.sybase.com>
Lines: 8
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:201
Article PK: 2023

Robert,

Thank you for the response. I am currently at version 8.0.1.26 ( via
@@version ). I still had some trouble with the duplicate key issue but then
added the "Defaults on" load option and it worked great.

Thanks again
Eric