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.

default Values in select into table statment

2 posts in General Discussion Last posting was on 2005-05-13 17:05:02.0Z
AHeitmann Posted on 2005-05-13 15:59:28.0Z
From: "AHeitmann" <test@test.de>
Newsgroups: ianywhere.public.general
Subject: default Values in select into table statment
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 212.105.206.29
X-Original-NNTP-Posting-Host: 212.105.206.29
Message-ID: <4284cee0@forums-1-dub>
Date: 13 May 2005 08:59:28 -0700
X-Trace: forums-1-dub 1115999968 212.105.206.29 (13 May 2005 08:59:28 -0700)
X-Original-Trace: 13 May 2005 08:59:28 -0700, 212.105.206.29
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4463
Article PK: 8273

Hi group,

we are using ASA 9.0.2.3044
There is a short form of
create table tab.... insert into tab.. select ... from tab2

I use the short form

Select ... into tab from tab2

But my original Table tab2 has default values. This default values are not
defined in the new table tab

Is this a bug or is this feature not avable? I only know that primary key
are not created if i use the
short select into tab

Thanks for the help
Greetings Andi


Glenn Paulley Posted on 2005-05-13 17:05:02.0Z
Newsgroups: ianywhere.public.general
Subject: Re: default Values in select into table statment
From: Glenn Paulley <paulley@ianywhere.com>
References: <4284cee0@forums-1-dub>
Organization: iAnywhere Solutions
Message-ID: <Xns96558518BCD06paulleyianywherecom@10.22.241.106>
User-Agent: Xnews/5.04.25
NNTP-Posting-Host: paulley-t41.sybase.com
X-Original-NNTP-Posting-Host: paulley-t41.sybase.com
Date: 13 May 2005 10:05:02 -0700
X-Trace: forums-1-dub 1116003902 10.25.99.149 (13 May 2005 10:05:02 -0700)
X-Original-Trace: 13 May 2005 10:05:02 -0700, paulley-t41.sybase.com
Lines: 52
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4464
Article PK: 8272

When using SELECT INTO <base table> the server has no way of knowing
whether or not any constraints/defaults/other features on the table(s)
referenced in the SELECT should be duplicated, so it refrains from doing
so.

(Remember that the SELECT may be an arbitrary query over more than one
table).

If you desire constraints or other non-default behaviours on the table,
you should explicitly CREATE the table first.

Glenn

"AHeitmann" <test@test.de> wrote in news:4284cee0@forums-1-dub:

> Hi group,
>
> we are using ASA 9.0.2.3044
> There is a short form of
> create table tab.... insert into tab.. select ... from tab2
>
> I use the short form
>
> Select ... into tab from tab2
>
> But my original Table tab2 has default values. This default values are
> not defined in the new table tab
>
> Is this a bug or is this feature not avable? I only know that primary
> key are not created if i use the
> short select into tab
>
> Thanks for the help
> Greetings Andi
>
>
>

--
Glenn Paulley
Research and Development Manager, Query Processing
iAnywhere Solutions Engineering

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