cancel
Showing results for 
Search instead for 
Did you mean: 

How to create column table using with clause

Former Member
0 Kudos

Hi

I want to know how can I create column table based on this script

with tb as

(SELECT 

       b."Request_ID",

       coalesce (b."Actual_CheckIn", b."Stay_From") from_date,

       coalesce (b."Actual_CheckOut", b."Termination_Date", b."Stay_To") to_date

FROM "_SYS_BIC"."suncor.sam.private.rmt.flda/CAL_LMS_RESERVATION" b)

select a.DATE_SQL,

       tb."Request_ID",

       1 as "Stay_Status"

FROM "_SYS_BI"."M_TIME_DIMENSION" a,

        tb

where

        tb.From_date <= a.DATE_SQL

       and tb.to_date> a.DATE_SQL

I used create column table as select......

it shows incorrect syntax near "with"

Do you know how I can create the script

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

HEre is the link for complete  syntax to create table, you can select to your choice.

CREATE TABLE - SAP HANA SQL and System Views Reference - SAP Library

I Suggest you to read this tread for better solutigon.