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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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