🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.databases.ms-sqlserver
2 messages
2 total messages Started by Jody Mon, 21 Jun 1999 00:00
Hopefully easy question from a newbie
#134
Author: Jody
Date: Mon, 21 Jun 1999 00:00
18 lines
1397 bytes
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.

--Jody
Re: Hopefully easy question from a newbie
#137
Author: Carl Brady
Date: Tue, 22 Jun 1999 00:00
35 lines
2078 bytes
Jody:  What's a DTS package?  It looks like you are trying to use VB syntax
for a recordset or resultset in SQL Server enterprise manager.  That won't
work.  This will (provided the cost1 and cost are currency or other numeric
datatype

Select "Answer" = (Select tblName.Cost1 + tblName.cost FROM tblName WHERE
whatever)

That might not be exactly right, but should be close.

Hope this helps


Jody wrote in message <7klvh1$2vc$1@nntp.mica.net>...
>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.
>
>--Jody
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads