QUERY INVALID ERROR

General
Enthusiast

QUERY INVALID ERROR

Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 710 StartFragment: 314 EndFragment: 678 StartSelection: 314 EndSelection: 314

/***query1 */
SELECT CURRENT_DATE ;

HI

   while using Multi Line comments as above i am getting query invalid error while executing it. Am i making any mistake here. Please help.

-Arun

Tags (1)
5 REPLIES
Enthusiast

Re: QUERY INVALID ERROR

Multi line comments ?

Conventionally comments  are placed -- for single line

For multiple-line comments, precede the comment with a forward slash and asterisk (/*), and follow the comment with an asterisk and forward slash (*/).

eg:

/* The comment string cannot be longer than 255 characters. */

Teradata Employee

Re: QUERY INVALID ERROR

There is no visible problem with what you posted. What tool are you using, and what exactly is the error?

Re: QUERY INVALID ERROR

I have the same issue and I found that the invalid error caused by the extra star sign in the comments.

I can run the below code without problem:

/* select name from MyTable */

select * from MyTable

But if I run the below:

/* select * from MyTable */

select * from MyTable

Or run:

/* * */

select * from MyTable

All errored.  My Teradata version is 15.00.0.2

Junior Supporter

Re: QUERY INVALID ERROR

Hi.

When you say "run", what do you mean exactly?

Can't you run the query in bteq, SQLAssistant, Studio, other?

Cheers.

Carlos.

Re: QUERY INVALID ERROR

Hi Carlos,

I say "run" means to execute this piece of code. What I normally do is the select the piece of code I want to execute and hit F5.

Cheers

Ethan