BookmarkSubscribeRSS Feed
kajal_30
Quartz | Level 8

Here is one error I am getting after doing some troubleshooting 

ERROR: CLI execute error: ERROR: Error from JDBC driver: Error while compiling statement: FAILED: SemanticException [Error 10004]:
Line 1:5175 Invalid table alias or column reference 'process_date': (possible column names are: )

After adding table alias 't' getting error:

ERROR: CLI execute error: ERROR: Error from JDBC driver: Error while compiling statement: FAILED: ParseException line 1:5168
missing EOF at 't' near 'source_table'

Tom
Super User Tom
Super User

Are you sure the code you posted here is what you are running via TOAD?

It seems to use an extremely strange syntax.

The start looks normal enough, basically requesting to insert some values for 7 selected variable into an existing dataset ("table" in SQL speak).

INSERT INTO NZ_tbl.final(rec_type,rv,trends,account,address,client,segment)
SELECT rec_type,rv,trends,account,address,client,segment
FROM 

What should go after the FROM keyword is a table (or something that looks like a table, such as a view or a subquery).

But instead you have this code that I cannot understand.

TABLE WITH FINAL(hd2('db.dev','','SELECT rec_type,rv,trends,account,address,client,segment FROM view where date = 20220526'))

What does TABLE mean here?

What does WITH mean here?

What does FINAL() mean here? Is it a function call?  Is it different than the final above which was the name of a table in the NZ_TBL schema?

What does HD2() mean here?  That looks a lot like a function call.  What type of function is that?  It looks like it takes three arguments that are all character strings.  What do they mean? What does it return? Does it return something that looks like a "table" ?

 

 

kajal_30
Quartz | Level 8

Though it is running fine but still not adding any records to the final table. May I know the possible reasons ? 

 

Regards

Kajal

SASKiwi
PROC Star

Can you post the complete SAS log of your latest run including SAS notes?

Tom
Super User Tom
Super User

The only TOAD I know is a tool for connecting to databases and submitting code. 

Is that what you are doing?

What database are you connecting to?

Did you try connecting to the same database from SAS and then using the EXECUTE statement of PROC SQL to push your current SQL to that database instead of using TOAD to push the SQL to the database?

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 19 replies
  • 2896 views
  • 0 likes
  • 4 in conversation