Uri Dimant
3/28/2007 9:10:00 AM
Andrew
Run it on SQL Server 2005 SP2a (db=80 level)
CREATE TABLE [dbo].[tblGrossUpFixedIncome](
[KeyID] [int] IDENTITY(1,1) NOT NULL,
[EmployeeID] [int] NOT NULL,
[ValidDate] [datetime] NOT NULL,
[FixedIncome] [money] NULL,
[FixedYN] [bit] NOT NULL CONSTRAINT [DF_tblGrossUpFixedIncome_FixedYN]
DEFAULT (0),
CONSTRAINT [PK_tblGrossUpFixedIncome] PRIMARY KEY CLUSTERED
(
[KeyID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]
INSERT INTO [tblGrossUpFixedIncome]([EmployeeID],[ValidDate],
[FixedIncome],[FixedYN]) VALUES
(2220, '2002/05/01 0:00:00', 1234567.0000 ,0)
SELECT * FROM [tblGrossUpFixedIncome]
UPDATE tblGrossUpFixedIncome SET FixedIncome = '3,4,5,6' WHERE KeyID = 1
--I got 3456.00
What do you suppose to get?
"Andrew Hayes" <AndrewHayes@discussions.microsoft.com> wrote in message
news:5FD0C316-30CB-4503-8F84-46785D086EC0@microsoft.com...
> Structure and sample as requested:
>
> CREATE TABLE [dbo].[tblGrossUpFixedIncome](
> [KeyID] [int] IDENTITY(1,1) NOT NULL,
> [EmployeeID] [int] NOT NULL,
> [ValidDate] [datetime] NOT NULL,
> [FixedIncome] [money] NULL,
> [FixedYN] [bit] NOT NULL CONSTRAINT [DF_tblGrossUpFixedIncome_FixedYN]
> DEFAULT (0),
> CONSTRAINT [PK_tblGrossUpFixedIncome] PRIMARY KEY CLUSTERED
> (
> [KeyID] ASC
> )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, FILLFACTOR = 90) ON
> [PRIMARY]
> ) ON [PRIMARY]
>
> 1 2220 2002/05/01 0:00:00 1234567.0000 False
> 2 2194 2002/04/01 0:00:00 2136200.0000 False
> 3 2222 2002/04/01 0:00:00 1102100.0000 False
> 4 2220 2002/06/01 0:00:00 1817960.0000 False
> 5 2194 2002/07/01 0:00:00 1265000.0000 False
> 6 2222 2002/07/01 0:00:00 1016600.0000 False
> 7 2222 2002/08/01 0:00:00 2033200.0000 False
> 8 2237 2002/10/01 0:00:00 369700.0000 False
> 9 2194 2002/10/01 0:00:00 393800.0000 False
> 10 2238 2002/11/01 0:00:00 279560.0000 False
>
> I'm sure you'll find the same result, and what I'm looking for is a 2005
> option setting for either the server or the database so that trying to set
> a
> money field using a string gives me an error without having to rewrite any
> stored procedures, command text, or change the table structure.
>