You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by puneet loya <pu...@gmail.com> on 2012/04/11 12:20:41 UTC

insert in cql

insert into users (KEY) values (512313);

users is my column family and key is its only attribute..

It is giving an error
bad request : line 1:24 required (...)+ loop did not match anything at
input ')'

do you find any error here?

Re: insert in cql

Posted by puneet loya <pu...@gmail.com>.
thank you :)

On Wed, Apr 11, 2012 at 8:55 PM, Eric Evans <ee...@acunu.com> wrote:

> On Wed, Apr 11, 2012 at 5:20 AM, puneet loya <pu...@gmail.com> wrote:
> > insert into users (KEY) values (512313);
> >
> > users is my column family and key is its only attribute..
> >
> > It is giving an error
> > bad request : line 1:24 required (...)+ loop did not match anything at
> input
> > ')'
> >
> > do you find any error here?
>
> Yes.  KEY here is presumably the row key (aka PRIMARY KEY) and you
> cannot store an otherwise empty row, you need at least one actual
> column.
>
> --
> Eric Evans
> Acunu | http://www.acunu.com | @acunu
>

Re: insert in cql

Posted by Eric Evans <ee...@acunu.com>.
On Wed, Apr 11, 2012 at 5:20 AM, puneet loya <pu...@gmail.com> wrote:
> insert into users (KEY) values (512313);
>
> users is my column family and key is its only attribute..
>
> It is giving an error
> bad request : line 1:24 required (...)+ loop did not match anything at input
> ')'
>
> do you find any error here?

Yes.  KEY here is presumably the row key (aka PRIMARY KEY) and you
cannot store an otherwise empty row, you need at least one actual
column.

-- 
Eric Evans
Acunu | http://www.acunu.com | @acunu