I want to do the following dynamically
Generate numbers from 1 to 100 and then select 25 random numbers from it and display it in a console. Any easy way to do so?
I have a sequence relationship:
A has many Bs.
B has many Cs.
C has many Ds.
They also make me so confused if there are more than 3 or 4,..tables.
So, how can i select all Cs that satify A.Id="1".
(something likes finding all grandsons of a grandfather)
Thanks in advance.
Is it real and how can I think about it.
To make so the user will select only the month and year, not date, because he need a period on full month, not some date.
here is simple control ...
<asp:TextBox ID="TextBox3" runat="server" />
<asp:CalendarExtender ID="TextBox3_CalendarExtender" runat="server"
Enabled="True" TargetControlID="TextBox3" />
I have to query a view and include only those columns which are defined in the XML which comes as a parameter to my SP. Can i include that XML in select clause and extract all columns defined in that XML. Please tell a way to do this.
I have
[Person]
PersonID, EmailAddress, FirstName, LastName
[OnlineAccount]
OnlineAccountID, PersonID, Nickname
Each person is allowed to have 0-* OnlineAccount.
In entity framework with C#, how do I select the top 5 Person that has the most accounts?
Have a requirement to select the 7th column. eg:
cat filename | awk '{print $7}'
The issue is that the data in the 4th column has multiple values with blank in between. example - The last line in the below output:
user \Adminis FL_vol Design 0 - 1 -
group 0 FL_vol Design 19324481 - 3014 -
user \MAK FL_vol Design 16875161 - 2618 -
tree 826 FL_vol Out Global Doc Mark 16875162 - 9618 - /vol/FL_vol/Out Global Doc Mark
I need to fetch only first record (because I need last date) of resultset, at the moment I have this resultset from this sql tring:
SELECT BCACC,FLDAT
FROM ANAGEFLF
ORDER BY FLDAT DESC
and I see this record:
A.M.T. AUTOTRASPORTI SRL 20080220
A.M.T. AUTOTRASPORTI SRL 20080123
A.M.T. AUTOTRASPORTI SRL 20070731
APOFRUIT ITALIA 20080414
APOFRUIT ITALIA 20080205
APOFRUIT ITALIA 20071210
APOFRUIT ITALIA 20070917
APOFRUIT ITALIA 20070907
now I need to take only one record (first) for every BCACC, I would take this resultset:
A.M.T. AUTOTRASPORTI SRL 20080220
APOFRUIT ITALIA 20080414
I've just try group it for BCACC but I receive an sql error, I'm workin on DB2 ibmI
I am open iphone photo library from the my application.And i am selecting photo in squre shape.Its fine.But i want select photo in round shape.How it possible?
{"names": [
{"patientName": "Ratna"},
{"patientName": "raju" },
{"patientName": "krishna"},
{"patientName": "kishore"},
{"patientName": "Kishore1"},
{"patientName": "mahesh"}
]}
this is the JSON object i'm getting from Ajax call
so now i want to add all patientName values to select box through jquery
can any one tell me how to accomplish this ??
here i'm using $.ajax() function for ajax call
thanks in advance
I have a table like this
C1 C2 C3 Code
1 2 3 33
1 2 3 34
2 4 1 14
1 2 3 14
i want to select only those record whose code is appearing only in single row. ie, in this case rows with code 33 and 34.. as they appear only once in this table.
How can i write a query for that
Is it posibble to select 3 tables at a time in 1 database?
Table 1: employee
-- employee_id
-- first_name
-- last_name
-- middle_name
-- birthdate
-- address
-- gender
-- image
-- salary
Table 2: logs
-- log_id
-- full_name
-- employee_id
-- date
-- time
-- status
Table 2: logout
-- log_id
-- full_name
-- employee_id
-- date
-- time
-- status
I wanted to get the value of employee table where $id of selected. Then the $id also get the value of log.time, log.date, logout.time, and logout.date.
I already try using UNION but nothing happens.
My table looks like this with duplicates in col1
col1, col2, col3, col4
1, 1, 0, a
1, 2, 1, a
1, 3, 1, a
2, 4, 1, b
3, 5, 0, c
I want to select distinct col1 with max (col3) and min(col2);
so result set will be:
col1, col2, col3, col4
1, 2, 1, a
2, 4, 1, b
3, 5, 0, c
I have a solution but looking for best ideas?
ok what i want to do is to using forcollection["Selectlist"] only selected things in the select list will be availabe when the form posted i am using add ,remove mechanism in my listbox , so i want to make everything that is there in the checkbox as available to the forcollection["Selectlist"]. can it be done?
It is possible to select last row selected by mysql_query in php without iterating using mysql_fetch_row from first row till last?
If so, what should I use?
Hi folks,
I have a jComboBox that I am populating with some objects. The objects are of a type which I have made myself, and include a String and an int. The object's toString method returns the String, which is displayed in the Combo Box.
Now, I wish to select an item in the Combo Box with code. How do I do this?
There are multiple items starting with the same letter
Thanks
I want to select data from one table (T1, in DB1) in one server (Data.Old.S1) into data in another table (T2, in DB2) in another server (Data.Latest.S2). How can I do this ?
Please note the way the servers are named. The query should take care of that too. That is,
SQL server should not be confused about fully qualified table names. For example - this could confuse SQL server - Data.Old.S1.DB1.dbo.T1.
i have following database table name tbl_rec
recno uid uname points
============================
1 a abc 10
2 b bac 8
3 c cvb 12
4 d aty 13
5 f cyu 9
-------------------------
-------------------------
i have about 5000 records in this table.
i want to select first 50 higher points records.
i can't use limit statement as i am already using limit for paging.
Thanks
I'm using Terminal.app on Mac OS10.6.3, with gnu screen and zsh.
What I want to do is, see pwd(or an URL) in Terminal.app and double click on it, and select the whole path, to copy and paste after that.
But what I get now is a single directory name, because '/' is not treated as a word.
I found that iTerm has a setting to change it(iTerm - Preferences - Mouse - Characters considered part of a word), but is there any way to do this on my environment?
Does anybody know how dropdown list can be opened with trigger?
Here is code which doesn't work:
$('select').trigger('click');
Just for note - mousedown and mouseup also doesn't work.
Hi guys i have a table with shifts history along with emp ids
im using this code to retrieve a list of employees and their total shifts by specifying the range to count from:
SELECT ope_id, count(ope_id)
FROM operator_shift
WHERE ope_shift_date >=to_date( '01-MAR-10','dd-mon-yy') and ope_shift_date
<= to_date('31-MAR-10','dd-mon-yy')
GROUP BY OPE_ID
which gives
OPE_ID COUNT(OPE_ID)
1 14
2 7
3 6
4 6
5 2
6 5
7 2
8 1
9 2
10 4
10 rows selected.
NOW how do i choose the employee with the highest no of shifts under the specified range date, please this is really important
i have the following code in an asp.net mvc view.
<% = Html.DropDownList("Filter", new SelectList(Model.Items, "Id", "Name", 0), new { @id = "Filter", @class = "autoComplete1" })%>
i want to add an element at the top of the dropdown as the first item that says, "Please select".
do i have to add that into my Model.Items or is there a way i can add that element into the view and ignore the selection of that first element ??
The whole question is pretty much in the title. For each row of the table I'd like to select the maximum of a subset of columns.
For example, from this table
name m1 m2 m3 m4
A 1 2 3 4
B 6 3 4 5
C 1 5 2 1
the result would be
name max
A 4
B 6
C 5
The query must be compatible oracle 8i.
Thanks.
Here a code I'm using now.
<%= f.select :project_id, @project_select %>
How to modify it to make it it's default value params[:pid] when page is loaded?