home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.sybase
- Path: sparky!uunet!psinntp!ctp!kkurk
- From: kkurk@ctp.com (Kendra Kurk)
- Subject: Why won't select into work?
- Message-ID: <1993Jan22.002512.11866@ctp.com>
- Sender: news@ctp.com
- Nntp-Posting-Host: luna.ctp.com
- Organization: Cambridge Technology Partners
- Distribution: us
- Date: Fri, 22 Jan 1993 00:25:12 GMT
- Lines: 63
-
-
- While creating a stored procedure, I ran into a problem that
- I can't seem to solve; perhaps someone out there can lend a hand!
-
- create proc foo
- (
- @id1 int,
- @id2 char(2)
- )
- as
-
- select
- name,
- dollars
- into
- #tmp
- from
- DATABASE_1..Record
- where
- id1 = @id1
- and id2 = @id2
-
- This returns an error 'implicit conversion from datatype int to datatype
- char not allowed.' HOWEVER, when I declare the table and insert into,
- there is no trouble - WHY?!!! This is very frustrating, and we can't
- seem to figure out why it occurs.
-
- create proc foo
- @id1 int,
- @id2 char(2)
- as
-
- create table #tmp
- (
- name char(10),
- dollars int
- )
-
- insert into #tmp
- select
- name,
- dollars
- from
- DATABASE_1..Record
- where
- id1 = @id1
- and id2 = @id2
-
-
- Thanks in advance . . .
- Kendra
-
- PS Running Sybase, version 4.9.0 on an HP
-
- Kendra Kurk
- CTP Inc.
- (617) 374-9800
- kkurk@ctp.com
-
- --
- Kendra Kurk
- kkurk@ctp.com
- Cambridge, Mass
-