How to add a virtual column ?
I need to make something like an auto increment pk in a new table i am about to load into Vertica.
But i dont have that data into my csv file !
How can i do this ?
But i dont have that data into my csv file !
How can i do this ?
0
Comments
-make sure the sequence is not used by any so the nextval should be 1
See example : This should do the trick
Thx
that worked , but i don't get all the data loaded into my table . i Mean i have millions of rows of data but not all appear in the count(*) from the loaded table.
-copy-from-rejections' by default.<BR />
Take a look at that data and you will find why not all of your data loaded. Also read the docs on copy command for more details.create table xyz(ID auto_increment,name varchar(2));
xyz.txt
an
bn
cn
dn
copy xyz from local 'path/xyz.txt';
select * from xyz;
1 an
2 bn
3 cn
4 dn
this may be enough