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.

Why Insert into .... select cannot work?

2 posts in Windows NT Last posting was on 2001-03-12 22:01:39.0Z
Kadee Posted on 2001-03-12 07:42:55.0Z
From: "Kadee" <kadee@kimo.com>
Subject: Why Insert into .... select cannot work?
Date: Mon, 12 Mar 2001 15:42:55 +0800
Lines: 31
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <eKcNgpsqAHA.301@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: 203.69.191.226
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1121
Article PK: 1088622

Hi,

My ASE is 11.9.2,
Why the following SQL cannot work?

insert into jftwkqtyd
select workno,0 as s1mpc,0 as s2mpc,0 as s3mpc,
0 as s1wt,0 as s2wt,0 as s3wt,mpcqty as wkmpc
from jpcworkissud d,jpcworkissum m
where m.issudate>'2000/12/1'
and m.pcname like '02%'
and m.workissuno = d.workissuno

the message from SQL advantage:
Server Message: Number 3624, Severity 10
Line 1:
Truncation error occurred.
Server Message: Number 3621, Severity 10
Line 1:
Command has been aborted.
********
I already set the database option "allow select into/bulk copy " TRUE

Thanks for any reply


Kadee


Bret Halford Posted on 2001-03-12 22:01:39.0Z
Message-ID: <3AAD4743.AD497399@sybase.com>
Date: Mon, 12 Mar 2001 15:01:39 -0700
From: Bret Halford <bret@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.5 [en]C-CCK-MCD (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Why Insert into .... select cannot work?
References: <eKcNgpsqAHA.301@forums.sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 25
NNTP-Posting-Host: bret-pc.sybase.com 157.133.80.211
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:1116
Article PK: 1088607

Probably a datatype mismatch on column workno or mpcqty between the
jftwkqtyd table and whichever of (jpcworkissud or jpcworkissum) the columns

are coming from. If you post the sp_help output for the three tables, we
should be able
to point out the problem.

-bret

Kadee wrote:

> Hi,
>
> My ASE is 11.9.2,
> Why the following SQL cannot work?
>
> insert into jftwkqtyd
> select workno,0 as s1mpc,0 as s2mpc,0 as s3mpc,
> 0 as s1wt,0 as s2wt,0 as s3wt,mpcqty as wkmpc
> from jpcworkissud d,jpcworkissum m
> where m.issudate>'2000/12/1'
> and m.pcname like '02%'
> and m.workissuno = d.workissuno
>
> the message from SQL advantage:
> Server Message: Number 3624, Severity 10
> Line 1:
> Truncation error occurred.
> Server Message: Number 3621, Severity 10
> Line 1:
> Command has been aborted.
> ********
> I already set the database option "allow select into/bulk copy " TRUE
>
> Thanks for any reply
>
> Kadee