All Forums General
larun1616 29 posts Joined 09/14
22 Sep 2014
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

Raja_KT 1246 posts Joined 07/09
22 Sep 2014

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. */
 

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

Fred 1096 posts Joined 08/04
25 Sep 2014

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

Ethan.Yu.W 2 posts Joined 09/15
24 Sep 2015

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
 
 

CarlosAL 512 posts Joined 04/08
25 Sep 2015

Hi.
When you say "run", what do you mean exactly?
Can't you run the query in bteq, SQLAssistant, Studio, other?
Cheers.
Carlos.

Ethan.Yu.W 2 posts Joined 09/15
11 Oct 2015

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

You must sign in to leave a comment.