I am developing an application using SQL Server 2000 as the back end database.
Is there a way to rewrite an INSERT INTO ... SELECT clause in which the target table dbo.LOCATION_ALL has a CITY field defined as VARCHAR 15
while the source table dbo.LOCATION_ALL_MOD has a CITY field defined as VARCHAR 50 ?
If I can avoid doing so, I don't want to change the field lengths for the field CITY.
I currently get the error:
Server: Msg 8152, Level 16, State 9, Line 3
String or binary data would be truncated.
The statement has been terminated.
INSERT INTO dbo.LOCATION_ALL
([Location_ID], [Description], [Address1], [Address2], [City], [State], [Zip], [CostCenter],
[PropertyStatus], [LeasedSpace], [LeaseStatus], [EndDate])
SELECT [LocationID], [Description], [Address1], [Address2], [City], [State], [Zip], [Cost Center],
[Property Status], [LeasedSpace], [Lease Status], [EndDate]