Assume a Cassandra datastore with 20 rows, with row keys named "r1" .. "r20".
Questions:
How do I fetch the row keys of the first ten rows (r1 to r10)?
How do I fetch the row keys of the next ten rows (r11 to r20)?
I'm looking for the Cassandra analogy to:
SELECT row_key FROM table LIMIT 0, 10;
SELECT row_key FROM table LIMIT 10, 10;
hi
i have 2 tables
table items has 144602 records
table A has 27721 records
code in items = BAR8 in A
i want to show all records that equal
i try this: SELECT Items.Code, A.BAR8
FROM Items INNER JOIN A ON Items.Code = A.BAR8;
and i get 28048 records !!! i need to get 27721 , how to do it ?
thank's in advance
I'd like to store emails in a separate table and allow users to save multiple emails and log in with any of them. I'd also like to store passwords in a different table.
How can I configure Devise to store authentication info elsewhere?
Worst case scenario, if I just have to hack into it, is there a generator to just port everything over to the app? I noticed there was a generator for the views.
Thanks.
Hi,
I have the following table:
bar_id, bar_name, subscription_id_fk, sub_name
eg:
1, Hard Rock, 2, Gold
2, TGIF, 1, Free
Now I need and SQL to extract this table, but where sub_name = Gold, I need to double the subscription_id_fk.
Can you please help
?
i have a very simple report that is generated from just one table. one of the columns in the table is a date.
i need to be able to allow the user of the report to enter a range of dates and display data only between those dates.
how do i do this?
I would like to store album's
track names in a single field in a
database.
The number of tracks are arbitrary
for each album.
Each album is one record in the table.
Each track must be linked to a specific URL which also should be stored in the database somewhere.
Is it possible to do this by storing them in a single field, or is a relational table for the track names/urls the only way to go?
I write an application in Java. I get form a database a table (clients) which contains fields like:
name | surname | adress
What is the best solution to store this data in my app? Should I create an object for each client and store these objects in a list or set?
The table contains about 100 records and it's already sorted.
Thanks in advance.
Actually what I want - simple DB with simple User Interface. Like MS Access, but for web and it can be without Dragn n Drop, but described with markup language.
For example if I want to create list report, then i need to write something like:
<table query="SELECT * from mytable"></table>
It needed for simple data applications. In that kind application no programming logic required. Just working with DB. Changing DB data and showing it.
I have a 'Customer' table with 'FirstName' and 'LastName' columns. I have to execute a search on the 'Customer' table after 'FirstName', 'LastName' and 'FirstName + LastName' depending on a TextBox text. What's the besty way/query to implement this using NHibernate or SQL query?
Is there a way to tell SQL server to use specific default seed value for IDENTITY columns - assuming the (to be run) CREATE TABLE statements do not specify one? I don't really care about altering existing data or altering the seed values for specific IDENTITY columns. I want the same seed for all newly created identity columns. Assume I cannot modify the individual CREATE TABLE statements in any way.
I have a table view with a list of categories and each category (understand table cell) has a different icon.
I would like to use one big image (sprite) and render different part of the image (single icon) for each row.
Any efficient ideas...
CREATE TABLE NewTable AS
SELECT A,B,C FROM Table1
minus
SELECT A, B, C From Table2
Create a new table with NULL values for column A
when neither Table1 or Table2 had NULL values for this column.
Yet,
SELECT * FROM
(
SELECT A,B,C FROM Table1
minus
SELECT A, B, C From Table2
)
WHERE A IS NULL
return 0 rows?
i have a table named news with 3 fields i.e (id, news, time) and i have a setInterval after every 3mints to fetch news from google or any news site ....
now i want to fetch only new rows inserted after every 5 minutes...with jquery $.ajax()...how can i do that...
do i reload the whole table or there is a way to fetch only the new ones...
I maintain a product that is installed at multiple locations which as been haphazardly upgraded. Unique constraints were added to a number of tables, but I have no idea what the names are at any particular instance. What I do know is the table/columnname pair that has the unique constraints and I would like to write a script to delete any unique constraint on these column/table combinations. This is MSSQL 2000 and later. Something that works on 2000/2005/2008 would be best!
I cant for the life of me get the contents of a string array (well its not strictly typed but all the items in the array are strings) to become a table, i am trying to use ConvertTo-HTML.
For example:
$arr = @("One", "Two")
$arr | ConvertTo-HTML
I have tried -As List, using fragments, even using InputObject, is it even possible ?
Edit: i simply want to know if there is anyway to use an array as the input for the ConvertTo-HTML cmdlet, all it does is make a table with the length property of the strings.
Hi
I have a table with the following structure:
id int(11),
name varchar(250)
I have lots of records in the table but when I am trying to find a particluar record which has the following value on the name field:
Lorem ipsum d\'olor sit amet
The query is simply returning a blank recordset. I am not being able to figure out this weird behaviour, when my query is as simple as follows:
SELECT * FROM slot_games WHERE name='Lorem ipsum d\'olor sit amet'
Would appreciate your help please! Thanks in advance.
hello !
languages table(languagename,languagecode(pk),part);
parts table(subjectype,part(pk));
I want to access only perticular subject type into drop downs...
How can i do this.
Is there a simple :) and efficient way or reading very large number of rows sequentially using Zend_Db?
Basically I need to process entire table, row by row. Table is large, primary key sequence is not guaranteed(i.e. not an autoincrement, but is UNSIGNED INT).
What's the best way to approach this?
Environment: PHP 5.2, Zend Framework 1.10, MySQL 5.1
i am creating a marks management system using php & mysqlwhere the concerned faculty will be able to login and enter the marks of the students. i can go with a simple table but the problem is there are 288 different subjects for which marks must be entered. So creating a mysql table with so many subjects does not look good for me. please suggest me the best way to manage user permissions so that only the corresponding faculty will be able to enter marks
hey,
i'am trying to update a row in a table using :
command.ExecuteNoQuery()
it's not giving me an error but it's not updating the row
This is my code :
Dim req As String = "Update Table Set Id= 5"
Dim cmd As New OleDb.OleDbCommand(req, connect())
cmd.ExecuteNonQuery()
disconnect()
thanks
Hi,
I'm trying to a create an update statement along the following lines:
TABLE car: id | owner_id | type | status
An owner can have multiple cars.
UPDATE car c
SET c.type = 1
WHERE c.owner_id IN ($ids)
AND c.status = [1 IF IT EXISTS, ELSE 0]
$ids is reasonably small (under 50 values).
It seems simple but I can't seem to get my head around it because I can't use a SELECT subquery with an UPDATE to the same table.
Anyone?
Thanks
Hi,
I am planning to get a report for a table with following table structure:
ID RequestDate
-----------------------------
1 2010/01/01
2 2010/02/14
3 2010/03/20
4 2010/01/07
5 2009/03/31
I want the results as:
I
D_Count RequestDate Sum
-----------------------------------------
2 2010/01 2
1 2010/02 3
2 2010/03 5
Pls help.
I have two database say DB_A and DB_B. In DB_A database, table having huge data (few tables are having 2 to 10 million data). I want to move the all table data from DB_A to DB_B database. Please help me on writing stored procedures to move efficiently (fast) the data from one database to another.