I don't a controllers model to use a database table.
I have a pages controller and model but it is saying "pages table not found". How do I tell the model not to use a the database at all?
Cheers!
I made a table of contents using \tableofcontents Each section is made using \section yet when I do \subsection it is not listed in the table. How do I get it to list there? Thanks.
I have a table of data as follows
id status conversation_id message_id date_created
1 1 1 72 2012-01-01 00:00:00
2 2 1 87 2012-03-03 00:00:00
3 2 2 95 2012-05-05 00:00:00
I want to get all the rows from the table in date_created DESC order, but only one row per conversation_id. So in the case of the example data above, I would want to get the rows with id 2 and 3.
Any advice is much appreciated.
this table i want to create and how assign job to first position???
job_id dynamic
Jobs Title text
Job Description text
Order combo box to choose after what job or at first position in the website
i create this table and cannot choose first job to view in my website
In Oracle, a table cluster is a group of tables that share common columns and store related data in the same blocks. When tables are clustered, a single data block can contain rows from multiple tables. For example, a block can store rows from both the employees and departments tables rather than from only a single table:
http://download.oracle.com/docs/cd/E11882_01/server.112/e10713/tablecls.htm#i25478
Can this be done in SQLServer?
Is there a fast/efficiency way to check if a table is empty?
DECLARE @StartEndTimes TABLE
(
id bigint,
StartTime datetime,
EndTime datetime
)
IF @StartEndTimes IS NOT NULL
Hi
I'm fighting to get the following mapping working in Grails 1.3.1 and MySQL:
class Login {
int id
String email
static mappings = {
table 'my_table'
id column: "Mgr_id"
version: false
}
}
No matter what I do the queries that are being issued refer to "schema.login" table instead of "schema.my_table". This is very frustrating... Can anyone answer why this might not be working?
I have written a program to store a bunch of strings in a JFC hash table. There are defiantly collisions going on, but I don't really know how it is handling them. My ultimate goal is to print the number of occurrences of each string in the table, and traversing the bucket or list would work nicely. Or maybe counting the collisions? Or do you have another idea of how I could get a count of the elements?
I have a 30M row table, which is indexed by ID now. However, a lot of the requests are around a much smaller subset, which is identified by app_user=1
Does it make sense to physically cluster the table according to this? If so, how can I do so?
Hai,
I want to create a JFrame with some TextFields and Buttons .I want to get next record in the table whenever i clicks on a "next button" and also a "previousbutton",clicks on it get the prprevous value from the table.
a = matrix(1:25,5,5)
B = capture.output(for (X in 1:5){
A = c(min(a[,X]),quantile(a[,X],0.25),median(a[,X]),quantile(a[,X],0.75),max(a[,X]),mean(a[,X]),sd(a[,X])/m^(1/2),var(a[,X]))
cat(A,"\n")
})
matrix(B,8,5)
what i was trying to do is to generate a table which each column has those element in A and in that order. i try to use the matrix, but seems like it dont reli work here...can anyone help
1 2 3 4 5
min
1st quartile
median
SEM
VAR
THIS IS WHAT I WANT THE TABLE LOOKS LIKE ..
Can anyone guide me how to create a table using obj-c for MAC. The program should read values from an NSArray object and display the values on the table.I wld appreciate if anyone helped me out.
Hi, I have a tabbar with one of the tabs containing a drilldown table.
I am having problems once the user has finished using the drilldown table. If they change to another tab, then change back to the original tab, the original tab is still where I left it (at the bottom of the drill down showing the detail view)
What I want is on moving to an alternative tab the old tab resets
I have tried adding all sorts of stuff to -(void)viewDidDisappear and -(void)viewDidUnload with no success
What do I need to do?
Cheers
Hi, I have a mysql table that I need to only contain 20 newest records before adding additional records.
New rows are added daily so I would like it first delete any records that are greater than the 20 allowed starting with the earliest.
The table contains an auto increment "id" column so I can easily determine which is the earliest records.
Thanks for any help.
I have 2 tables, same structure, same rows, same data but the first has more columns (fields).
For example:
I select the same 3 fields from both of them (SELECT a,b,c FROM mytable1 and then SELECT a,b,c FROM mytable2)
I've tried to run those queries on 100,000 records (for each table) but at the end I got the same execution time (0.0006 sec)
Do you know if the number of the columns (and in the end the size of the one table is bigger than the other) has to do something with the query execution time?
I'm having a problem trying to wrap my head around how to query the database to retrieve the foreign keys in my Nav table and then using those to find the id's in the NavItem table. Can someone point me in the right direction or give me some pointers? i'm not even sure if this should be done in the model or the controller!
Thanks in advance
My Table column (ID , startDate , EndDate )
I need to use this way with every row of the table :
not with a specific value like :
declare @start DATE = '2011-05-30'
declare @end DATE = '2011-06-10'
;with months (date)
AS
(
SELECT @start
UNION ALL
SELECT DATEADD(month,1,date)
from months
where DATEADD(month,1,date)<= DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,@end)+1,0))
)
select Datename(month,date) from months
it possible ??
I have a table of the following structure
ID | Amount | Bank (1 or 2)
---+--------+------
1 | 100000 | 1
2 | 256415 | 2
3 | 142535 | 1
1 | 214561 | 2
2 | 123456 | 1
1 | 987654 | 2
I want a result like this (from the same table):
ID | sum(Bank 1) | sum(Bank 2)
---+-------------+------------
1 | 100000 | 1202215
2 | 123456 | 256415
3 | 142535 | 0
What will be the easiest query to achieve this?
ruby on rails ferret search:.only 10 records are getting from table.For pagination i did it ,but only 10 records are getting even though there exists more records satisfying the search condition.if any of you know how to solve this,please reply. no limit is givenf it is not a ferret search all records are getting from table , and pagination is working
the code is:
@search_sd_ticket_result=ServiceDeskTicket.find_with_ferret(params[:sd_ticket][:servicedeskticket]).paginate :per_page =5, :page=params[:page]
how to avoid duplicate insert in a table? I use below query to insert in to table:
insert into RefundDetails(ID,StatusModified,RefundAmount,OrderNumber)
select O.id,O.StatusModified,OI.RefundAmount,O.OrderNumber
from Monsoon.dbo.[Order] as O
WITH (NOLOCK) JOIN Monsoon.dbo.OrderItem as OI
WITH (NOLOCK)on O.Id = OI.OrderId
WHERE o.ID in (SELECT OrderID
FROM Mon2QB.dbo.monQB_OrderActivityView
WHERE ACTIVITYTYPE = 4 AND at BETWEEN '10/30/2012' AND '11/3/2012') AND (O.StatusModified < '11/3/2012')
following the answer here, altho it solved my problem, it displays a blank table. .something like this. the data does get inserted in the mysql but the table displays nothing.
the codes are posted on the above link.
your help would be appreciated. thanks!
I have this table I want when I click on a link in a table row that do a redirect to another page the data will be sent to the new page that can help me I have not found how to start
I'm really stuck
code table
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
<thead>
<tr>
<th>Date</th>
<th>provider</th>
<th>CI</th>
<th>CELL</th>
<th>BSC</th>
<th>Commentaire</th>
<th>nbr</th>
<th>Type</th>
<th><img src="{{ asset('image/Modify.png') }}" ALIGN="CENTER"/></th>
<th><img src="{{ asset('image/Info.png') }}" ALIGN="CENTER"/></th>
<th><img src="{{ asset('image/Male.png') }}" ALIGN="CENTER"/></th>
<th>type_alertes</th>
</tr>
</thead>
<tbody>
<div class="textbox">
<h2> Information KPI dégradées</h2>
<div class="textbox_content" id="kpi_dégrades">
{% for liste in listes %}
<tr class="gradeU">
<td>{{ liste.DAT }} </td>
<td>{{ liste.PROVIDER}} </td>
<td>{{ liste.CI}} </td>
<td>{{ liste.CELL}} </td>
<td>{{ liste.BSC}}</td>
<td>{{ liste.Cmts}}</td>
<td >{{ liste.nbr}}</td>
<td>{{ liste.TYPE}}</td>
<td><a class="edit" href="">Edit</a></td>
<td onclick="getInfo('{{ liste.CELL}}')">Information KPI dégradés</td>
<td>{{ liste.user_name}}</td>
<td>{{ liste.type_alertes}}</td>
</tr>
{% endfor %}
</div>
</div>
</tbody>
I have a data Table with numbers formatted according to the current regional settings. ie ( in French decimal separators are ',' instead of '.' in English). I need to export it to XML. Numbers in XML needs to be formatted according to the current regional settings.But now numbers in XML are formatted in English.Is there any way to make the number formatting in XML according to current regional settings ( or based on the locale of the Data Table) during the exporting process ?
I want to make auto increment id in two MySQL tables (if in first table there is id=4 then it cannot be id=4 in the second table). My question is how can I do that in the best way?
Tried to find the answer, but still couldn't.. The table is as follows:
id, keyword, value
1 display 15.6
1 harddrive 320
1 ram 3
So what i need is something like this.. Select an id from this table where (keyword="display" and value="15.6") AND (keyword="harddrive" and value="320")
There's also a possibility that there will be 3 or 4 such keyword conditions which should result into returning one id (one row)
It seems there's something to deal with UNION but i didn't use it before so i can't figure it out
Thanks in advance