Space in Table names & Alias names - SQL Server to Snowflake Migration
Table name with space in it:
Microsoft SQL Server allows space in the table name and column names:
CREATE TABLE [EMPLOYEE DETAILS]
[EMP NAME] VARCHAR(100)
CREATE TABLE "EMPLOYEE DETAILS"
"EMP NAME" VARCHAR(100
Alias name with space:
SELECT [EMPLOYEE TABLE].ID FROM EMPLOYEE AS [EMPLOYEE TABLE]
SELECT "EMPLOYEE TABLE".ID FROM EMPLOYEE AS "EMPLOYEE TABLE"
Alias name enclosed in single quote
select 'Calvin' AS 'Employee Name'
select 'Calvin' AS "Employee Name"
Column Alias name assigned using = sign
select [Employee Name] = 'Calvin'
select 'Calvin' AS "Employee Name" (* This conversion is not supported by the tool at this time)
NOTE: Column names enclosed in double quotes in Snowflake are case sensitive, meaning you have to use the exact same case in your queries
Enjoy great content like this and a lot more !
Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds