Re: [sqlite] How to access values of a columns with specific row id.

2012-01-31 Thread David Bicking

On 01/31/2012 04:05 AM, bhaskarReddy wrote:


Hi Friends,


Can any one tell me how to access values of a table column
with its particular row id.

  I tried with "select * from ontTable where rowid=2;"

  I am getting the output as 1|2|3|XYZ234|4|ABCD123|5.

 Here i want the values of column should store in separate
variables.


Can any one tell me how to access column by column.


Regards,
Bhaskar Reddy.


How are you calling sqlite?  What operating system are you using, what 
programming language?


I'm guessing you are getting that output from the command line program. 
While you can do useful things using cmd.exe on windows or bash on 
unix-like systems, it is difficult and not really recommended.


To really give you a meaningful answer, we really need to know what you 
are trying to accomplish and what limits you have in what you can do.


David
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to access values of a columns with specific row id.

2012-01-31 Thread Petite Abeille

On Jan 31, 2012, at 10:05 AM, bhaskarReddy wrote:

> Can any one tell me how to access values of a table column with its 
> particular row id.

In general, I would suggest that you get the basics straight:

http://www.sqlite.org/books.html

> I tried with "select * from ontTable where rowid=2;"

http://www.sqlite.org/lang_select.html

> Can any one tell me how to access column by column.

http://www.sqlite.org/c3ref/column_name.html


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to access values of a columns with specific row id.

2012-01-31 Thread Larry Knibb
select columnName from ontTable where rowid = 2;

select * gets you all of the columns for the row. select columnName
will just get one column.

Cheers,
Larry

On 31 January 2012 17:05, bhaskarReddy  wrote:
>
> Hi Friends,
>
>
>               Can any one tell me how to access values of a table column
> with its particular row id.
>
>             I tried with "select * from ontTable where rowid=2;"
>
>             I am getting the output as 1|2|3|XYZ234|4|ABCD123|5.
>
>            Here i want the values of column should store in separate
> variables.
>
>
>           Can any one tell me how to access column by column.
>
>
> Regards,
> Bhaskar Reddy.
>
>
>
>
> --
> View this message in context: 
> http://old.nabble.com/How-to-access-values-of-a-columns-with-specific-row-id.-tp33234692p33234692.html
> Sent from the SQLite mailing list archive at Nabble.com.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] How to access values of a columns with specific row id.

2012-01-31 Thread bhaskarReddy

Hi Friends,


   Can any one tell me how to access values of a table column
with its particular row id.

 I tried with "select * from ontTable where rowid=2;"
  
 I am getting the output as 1|2|3|XYZ234|4|ABCD123|5.

Here i want the values of column should store in separate
variables.


   Can any one tell me how to access column by column.


Regards,
Bhaskar Reddy.




-- 
View this message in context: 
http://old.nabble.com/How-to-access-values-of-a-columns-with-specific-row-id.-tp33234692p33234692.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users