IBM Support

Error when using MSSQL #TEMP table in Native SQL

Troubleshooting


Problem

Microsofts SQL Server has a concept of using a temporary in-memory table called #TEMP. While in SQL Server Query Analyzer the following example against the Cognos GOSL sample database works perfectly it will result in errors when used in FM or Report Studio for native/pass-through SQL. Example: select "ORDER_NUMBER" as OrdNo into #TEMP from dbo.ORDER_HEADER (#TEMP table will contain 5360 rows). When using the same syntax in FM as either native or pass-through SQL and testing the statement it results in an error. [ Error:

QE-DEF-0260 Parsing error before or near position: 47 of "Select "ORDER_NUMBER" as OrdNo into #TEMP From" QE-DEF-0299: Expanding: #TEMP From from position: 36, to position: 47, text fragment: #TEMP From.

]

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Framework Manager","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.2;10.2.1;10.2.2","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}},{"Product":{"code":"SS6G84","label":"IBM Cognos Analytics on Cloud"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
30 April 2025

UID

swg21335456