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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Select Into differences between SP1 and SP2

Author  Topic 

dadunn
Yak Posting Veteran

67 Posts

Posted - 2001-05-07 : 18:31:54
A developer created this query on the test box which had SQL 7 SP1. It ran with no problems.

On the production box with SQL7 SP2 we get this error.

Server: Msg 2731, Level 16, State 1, Line 2
The width of column 'GenNumber' is 0. This width is not valid.

If we replace the "" with Null it works under SP2 but the developer thinks it may cause other problems down the line.

Is this by design or does anyone know if SP3 fixes it.

Dave


SELECT "" AS GenNumber,
"" AS ReceiptKey,
"" AS ReceiptLineNumber,
"" AS TariffKey,
"" AS ExternReceiptKey,
"" AS ExternLineNo,
"SWH" AS StorerKey,
"" AS POKey,
SKU,
"" AS AltSKU,
"" AS [ID],
"" AS Status,
"" AS DateReceived,
SUM(QtyExpected) as QtyExpected,
"" AS QtyAdjusted,
"" AS QtyReceived,
"" AS UOM,
"" AS PackKey,
"" AS VesselKey,
"" AS VoyageKey,
"" AS XDockKey,
"" AS ContainerKey,
"Storage" AS ToLoc,
"" AS ToLot,
"" AS ToID,
"" AS ConditionCode,
"" AS Lottable01,
"" AS Lottable02,
"" AS Lottable03,
"" AS Lottable04,
"" AS Lottable05,
"" AS Lottable06,
"" AS Lottable07,
"" AS Lottable08,
"" AS Lottable09,
"" AS Lottable10,
"" AS CaseCnt,
"" AS InnerPack,
"" AS Pallet,
"" AS [Cube],
"" AS GrossWgt,
"" AS NetWgt,
"" AS OtherUnit1,
"" AS OtherUnit2,
"" AS UnitPrice,
"" AS ExtendedPrice,
"" AS EffectiveDate,
"" AS Forte_Flag,
"" AS AddDate,
"" AS AddWho,
"" AS EditDate,
"" AS EditWho,
"" AS TrafficCop,
"" AS ArchiveCop,
"" AS SUSR1,
"" AS SUSR2,
"" AS SUSR3,
"" AS SUSR4,
"" AS SUSR5,
"In Storage" AS Notes,
3 AS Priority,
"N" AS Flag

INTO SWH_Receipts_Unprocessed3

FROM SWH_Receipts_Unprocessed

WHERE Priority = 3

GROUP BY StorerKey,
SKU



   

- Advertisement -