Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/101810

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 19:13, 12 August 2020 by X010 (talk | contribs) (X010 moved page Microsoft KB Archive/Q101810 to Microsoft KB Archive/101810 without leaving a redirect: Text replacement - "Microsoft KB Archive/Q" to "Microsoft KB Archive/")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

FIX: SELECT INTO Variable and Table May GP Fault Server

PSS ID Number: Q101810 Article last modified on 10-31-1994

4.20 4.20a

OS/2

The information in this article applies to:
- Microsoft SQL Server versions 4.2 and 4.2a for OS/2

BUG# OS/2: 1626 (4.2)

SYMPTOMS

Executing a SELECT INTO statement that uses invalid syntax by assigning results to a local variable may trap SQL Server.

The following example traps the server:

declare @db_num smallint select @db_num = max(dbid) into #temp from sysdatabases

WORKAROUND

The above syntax is invalid. The same effect can be achieved by using either of the following two sets of statements:

declare @db_num smallint select @db_num = max(dbid) from sysdatabases

or

select max(dbid) into #temp from sysdatabases

If you want to assign to a variable and send data to a new table, use both statements.

STATUS

Microsoft has confirmed this to be a problem in SQL Server versions 4.2 and 4.2a for OS/2. This problem was corrected in SQL Server version 4.2aK10. For more information, contact your primary support provider.

Additional reference words: 4.20 4.2 GP_Fault Transact-SQL KBCategory: kbprg KBSubCategory: SSrvServer

=================================================================

Copyright Microsoft Corporation 1994.