I'd like to select all records from a table (names) where lastname is not unique. Preferrably I would like to delete all records that are duplicates.
How would this be done?
Hi
Here is my table CusOrder that collect customer order
OrderID Cus_ID Product_ID NumberOrder OrderDate
1 0000000001 9 1 6/5/2553 0:00:00
2 0000000001 10 1 6/5/2553 0:00:00
3 0000000004 9 2 13/4/2553 0:00:00
4 0000000004 9 1 17/3/2553 0:00:00
5 0000000002 9 1 22/1/2553 0:00:00
7 0000000005 9 1 16/12/2552 0:00:00
8 0000000003 9 3 13/12/2552 0:00:00
10 0000000001 9 2 19/11/2552 0:00:00
11 0000000003 9 2 10/11/2552 0:00:00
12 0000000002 9 1 23/11/2552 0:00:00
I need to select 3 lastest order for each customer and I need all customer
so it will show each customer and his/her 3 lastest order
how can I do it
sorry for my bad english
public ActionResult Example()
{
var q = from i in proba.name
select i;
return View();
}
How with this data make Json data and put them to table (on some View - no strongly typed)
If you have 2 cross classifying variables you can use rowSums and colSums to produce margin totals on an xtabs output. But how can it be done if you have 3 classifying variables (ie margin totals in each sub table)?
I have 3 tables, with 3 fields all the same. I basically want to select information from each table
For example:
userid = 1
I want to select data from all 3 tables, where userid = 1
I am currently using:
SELECT r.*,
p.*,
l.*
FROM random r
LEFT JOIN pandom p ON r.userid = p.userid
LEFT JOIN landom l ON l.userid = r.userid
WHERE r.userid = '1'
LIMIT 0, 30
But it doesn't seem to work.
(This question is specific to SQLite3, but it may be common to all SQL I don't know.)
This doesn't seem to work. Is it because the column names don't match? (If they match, it works.) If this is true, how can I select from a different field in the source table?
INSERT INTO [ImagePoint] (ImageID, PointID, X, Y)
SELECT Image2ID, PointID, X, Y
FROM Point
Hi friends,
I have one key but different values for that key, I tried HashTable but i dont think that is the rite way of doing it.
I'll explain in detail what is is requirment is:
I have a Key - "Asp.net"
for that i have n no of values - 61, 67, 100
So i have to store this somewhere like Dictionary or hash table.
TIA
How to iterate through luabind class (in lua or in c++)?
class 'A'
function A:__init()
-- Does not work
-- self is userdata, not a table
for i, v in pairs(self) do
end
end
Thanks
in sqlite3's client CLI, there is " .import file TABLE_name " to do it.
But, I do not want to install sqlite3 to my server at present.
in python sqlite3 module, we can creat and edit a DB.
But, I have not found a way to import data-file to a TABLE,
except inserting rows one by one.
any other way? Thanks.
i am using Docmd.TransferText to import data from a text file into my access table.
i would like it to do the following:
if the record already exists, then update it
if the record does not exist then add it
how do i accomplish this?
currently i have this line:
DoCmd.TransferText acImportDelim, yesyes, "table3", "C:\requisition_data_dump.txt", True
i would like to force the textbox to immediately change the text to UCASE as soon as the user moves away from the field. is this possible?
the important thing is that this text will be used in a SQL query to update a table.
I want to check if innerHtml have X or O , so i can not add again any thing else , but it's not working . it stop after adding the check code , I'm trying here to do a simple X O game to get more familiar with javascript and jquery .
also I'm not sure if can do this with jQuery .
<script type="text/javascript" >
function ranFun() {
return Math.floor((Math.random() * 9) + 1);
}
var a;
function Elment(a) {
document.getElementById("td" + a).innerHTML = "O";
}
function call() {
var x = ranFun();
switch (x) {
case 1:case 2 :case 3: case 4 :case 5 : case 6 : case 7 : case 8 : case 9 :
Elment(x);
break;
default:
break;
}
}
function tdElm(c) {
if ($('#td1').text() === "x" || $('#td1').text() == "o")
return false;
else {
document.getElementById("td" + c).innerHTML = "x";
call();
}
}
</script>
<BODY>
<center>
<h1 >" X ,O Game "</h1>
<table >
<tr>
<td id="td1" onclick="tdElm(1);" ></td>
<td id="td2" onclick="tdElm(2);"></td>
<td id="td3" onclick="tdElm(3);"></td>
</tr>
<tr>
<td id="td4" onclick="tdElm(4);"></td>
<td id="td5" onclick="tdElm(5);"></td>
<td id="td6" onclick="tdElm(6);"></td>
</tr>
<tr>
<td id="td7" onclick="tdElm(7);"></td>
<td id="td8" onclick="tdElm(8);"></td>
<td id="td9" onclick="tdElm(9);"></td>
</tr>
</table>
</center>
</BODY>
I am trying to fetch records based on two dates from sql server...
Select * from table where CreatedDate between @StartDate and @EndDate and i pass 5/12/2010 and 5/12/2010 (ie) fetching records for today... I have 17 records dated 5/12/2010 but none seems to get selected....
EDIT:
I use this but when i debug my value it shows 5/12/2010 12:00:00AM
DateTime baseDate = DateTime.Today;
var today = baseDate;
GetBookingReportByDate(today,today);
Hi all and thanks in advance.
I have a small problem which can not resolve, I have this table, and I want to sort by date and group it (but I only show 1 per idCAT)
| id | idcat | name | date |
| 1 | 3 | xx | 2011-01-02 |
| 2 | 4 | xf | 2011-01-02 |
| 3 | 3 | cd | 2011-01-01 |
| 4 | 1 | cg | 2011-01-04 |
| 5 | 4 | ce | 2011-01-06 |
would like to stay that way, try in a way but I can not
| 2 | 4 | xf | 2011-01-01 |
| 3 | 3 | cd | 2011-01-02 |
| 4 | 1 | cg | 2011-01-04 |
hi,
currently i have 2 table in mysql
structure:
messages
id | content | user_id | time
submessages
id | subcontent | msg_id | user_id | time
submessages msg_id is FK for messages id.
Now i need to query from php
$cur_user = $user->current; // current user id.
SELECT * FROM messages WHERE id > '{$_GET['id']}' // problem here
how do i query submessages that posted by others not include current user?
thank you.
for an prepared statement
update table t set a = ? ,b = ? where i = ?
column a to stay column a ie. a=a and only need to setInt for b and visa versa, without needing another statement. Is there a concise way of doing this?
Can someone please direct me to process for doing this? I have already done the Login verification exercise using mySQL for the dbase on my host server (thanks to kiksy). Now I am trying to move forward and "Query" from the iPhone a list of "users" that currently occupy the table (iphoneusers) in MySQL. And of course get it back to the iPhone via the php connection.
Any help would be very much appreciated.
ronbowalker
I'm trying to make a stored procedure but it doesn't seem to be recognizing the parameters I've given it.
Procedure
create procedure test_pro(IN searchTable VARCHAR(55))
begin
select * from searchTable limit 10;
end //
Trying to execute
mysql> call test_pro('exampleTable');
ERROR 1146 (42S02): Table 'db.searchTable' doesn't exist
It isn't replacing the searchTable with the parameter that is passed in.
I'm looking to grab a group of tables that have more than X rows with jQuery. Currently, I'm doing something similar to:
$("table").each(function(){
if($(this).find("tr").length > x){
tableArray[tableArray.length] = $(this);
}
});
and then acting on the members of the tableArray.
Is there a better way of getting these tables, perhaps a nice selector I've missed?
Thanks
Hi friends,
I have one key but different values for that key, I tried HashTable but i dont think that is the rite way of doing it.
I'll explain in detail what is is requirment is:
I have a Key - "Asp.net"
for that i have n no of values - 61, 67, 100
So i have to store this somewhere like Dictionary or hash table.
TIA
public struct Items
{
public string Id;
public string Name;
}
public Items[] _items = null;
if (_items.Contains("Table"))
{
// i need to check the structure and need to return correponding id
}
and am having a list of variables in my structure variable...
i need to search a Name in the structure(_items) and i want to return the Corresponding Id.
how to do this,