Why I could not use sample function in teradata studio?

Database

Why I could not use sample function in teradata studio?

A very simple trial:

select *

from my_table

sample 0.1;

 

"Failed to execute SQL: Parse Error spliting statement".

2 REPLIES
Enthusiast

Re: Why I could not use sample function in teradata studio?

could be wrong here, but doesnt the sample value need to be a whole number?

Re: Why I could not use sample function in teradata studio?

Thanks, Loafob.

I worked on Aster database, not Teradata database. I did not realize they are two different database. So I need to use:

SELECT * FROM Sample (

ON { table_name | view_name | (query) }

PARTITION BY { ANY | key }

SampleFraction ('fraction')

[ Seed ('seed') ]

);