Describe the bug
I'm trying to convert to AST a query that creates temporary tables using SELECT * INTO #temp_table FROM table. This is not supported and I have to remove the INTO #temp_table for query to parse.
Database Engine
TransactSQL
To Reproduce
SELECT
SSEF.ClientTypeId,
COACH.EnrollmentId,
COACH.InteractionId,
COACH.InteractionCloseDate,
COACH.InteractionCloseDateTs,
COACH.InteractionCloseModality,
COACH.InteractionPurpose,
COACH.CoachingSessionSequence,
COACH.IsCoachingSessionYN,
COACH.IsAdminSupportYN,
COACH.EVENT_CK,
COACH.IS_BILLABLE_EVENT
INTO #tem_table
FROM [RptQFL].[vw_ClosedCoachInteractions] AS COACH WITH (NOLOCK)
INNER JOIN [RptQFL].[vw_StateStandardExtractFields] AS SSEF WITH (NOLOCK)
ON SSEF.EnrollmentId = COACH.EnrollmentId
WHERE COACH.IS_BILLABLE_EVENT = 1
AND SSEF.IsEnrollmentValid = 1
AND COACH.InteractionCloseDate BETWEEN @BeginDt AND @EndDt;
Expected behavior
I expected the parser to return the AST for this query.
Screenshots
If applicable, add screenshots to help explain your problem.
Describe the bug I'm trying to convert to AST a query that creates temporary tables using SELECT * INTO #temp_table FROM table. This is not supported and I have to remove the INTO #temp_table for query to parse.
Database Engine TransactSQL
To Reproduce SELECT SSEF.ClientTypeId, COACH.EnrollmentId, COACH.InteractionId, COACH.InteractionCloseDate, COACH.InteractionCloseDateTs, COACH.InteractionCloseModality, COACH.InteractionPurpose, COACH.CoachingSessionSequence, COACH.IsCoachingSessionYN, COACH.IsAdminSupportYN, COACH.EVENT_CK, COACH.IS_BILLABLE_EVENT INTO #tem_table FROM [RptQFL].[vw_ClosedCoachInteractions] AS COACH WITH (NOLOCK) INNER JOIN [RptQFL].[vw_StateStandardExtractFields] AS SSEF WITH (NOLOCK) ON SSEF.EnrollmentId = COACH.EnrollmentId WHERE COACH.IS_BILLABLE_EVENT = 1 AND SSEF.IsEnrollmentValid = 1 AND COACH.InteractionCloseDate BETWEEN @BeginDt AND @EndDt;
Expected behavior I expected the parser to return the AST for this query.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Error in the console: