Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
zippy
Yak Posting Veteran
69 Posts |
Posted - 2001-10-06 : 18:02:04
|
| This is my table,I have been using it for a while with the Active column in there, it either contains a 1 or a 0 (this is so I dont have to check through the startdates for nullsCREATE TABLE [dbo].[tblCountries] ( [CountryID] [int] NOT NULL , [Active] [int] NOT NULL , [Country] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [StartDate] [datetime] NULL ) ON [PRIMARY]It has been working fine for ages, I have been using a storedprocedure to add countries and update values,my problem is this,I am transfering a whole bunch of data from an access database to this, I dont like using DTS so I am just making scripts to execute in asp to do it (maybe not the most elegant way but i find it good - ususally).When I try to create this spCREATE PROCEDURE upAddCountry@CountryID INT,@Country VARCHAR(20),@Active INT,@StartDate DATETIMEASIF Active = 1INSERT INTO tblCountries (CountryID, Active, Country, StartDate) VALUES (@CountryID, @Active, @Country, @StartDate)ELSEINSERT INTO tblCountries (CountryID, Country, Active) VALUES (@CountryID, @Country, @Active)GOIt gives me this message:Server: Msg 207, Level 16, State 3, Procedure upAddCountry, Line 7Invalid column name 'Active'.Why would that be?Check out the worlds fastest computers at http://www.ocgurus.com |
|
|
|
|
|
|
|