🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.databases.ms-sqlserver
Article #126

Re: Hopefully easy question from a newbie

#126
From: Builder
Date: Wed, 24 Nov 1999 00:00
28 lines
1846 bytes
On Mon, 21 Jun 1999 14:22:25 -0400, "Jody"
<jody.finazzo@classic-co.com> wrote:

>Hi.  I'm working on a DTS package in Enterprise Manager.  What I'm trying to
>do seems like it should be simple enough, but I'm having a hard time.
>
>Here's the scenario.  I'm trying to take two fields, add them together and
>place the result in the new field.  Here's how I tried to do it:
>
>DTSDestination("costtotal") = DTSSource("cost1") + DTSSource("cost")
>
>I get the error message "type mismatch".  The data types of the fields are
>exactly the same and should be large enough to hold the data.
>
>Since I'm new at this, I thought I'd see if anyone on here could help me.
>Is my syntax correct and should I be looking closer at the data or is my
>syntax totally off?
>
>Thanks in advance for any help.

If you get the "type mismatch" error then you do indeed have atype
mismatch. If your DB firlds are the same ie "money" then you may have
to do a transformation in your code ie "CInt" or some such like.

just a thought I had the same problem with a date field and used CDate
to get it to work.

Hope this helps :)
Technical Details
Message-ID: <383bb707.9323253@news>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7km1cc$3da$1@nntp.mica.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10f695,4e51240198d639f5
X-Google-Attributes: gid10f695,public
X-Google-Thread: ff490,4e51240198d639f5
X-Google-Attributes: gidff490,public
X-Google-Thread: 104de1,4e51240198d639f5
X-Google-Attributes: gid104de1,public
From: yeah@right.com (Builder)
Subject: Re: Hopefully easy question from a newbie
Date: 1999/11/24
Message-ID: <383bb707.9323253@news>
X-Deja-AN: 552442643
References: <7km1cc$3da$1@nntp.mica.net>
X-Trace: news1-hme0 943437689 161.12.195.57 (Wed, 24 Nov 1999 10:01:29 GMT)
NNTP-Posting-Date: Wed, 24 Nov 1999 10:01:29 GMT
Newsgroups: comp.databases.ms-sqlserver,cz.comp.microsoft.sql,microsoft.public.sqlserver.server