I've got a student table and an enrollment table; a student could have multiple enrollment records that can be active or inactive.
I want to get a select that has a single student record and an indicator as to whether that student has active enrollments.
I thought about doing this in an inline UDF that uses the student ID in a join to ...
I have a table such as:
id name ref_id order data_obj
-- ---- ------ ----- --------
1 Sam 0 15 [binary data]
2 Jack 0 20 [binary data]
3 Sue 0 25 [binary data]
4 Sam2 1 - [no data]
5 Sue2 3 - [no data]
6 Sam3 1 - [no data]
The idea is that I ha...
I have three select boxes.
<div style='float: left; padding-right: 10px;'>
<select size="10" name="company_id">
// a lot of options here
</select>
</div>
<div style='float: left; padding-right: 10px;'>
<select size="10" name="department_id" id="department_id">
// a lot of options here
</select>
</div>
<...
I have a simple problem here using SQL views. I just can't seem to figure it out at the moment.
I have 2 tables, TableA and TableB.
I want to retrieve FieldA in TableA
and FieldB in TableB.
The two tables are linked using an
INNER JOIN.
I only want rows where TableA.FieldA
are distinct.
The returned values should be of the top 10 items...
Hey guys, first off let me just say Im a jQuery noob! I want to make a simple plugin that auto-populates a html select element, it works fine on the first element but when I call it again to populate a second it appends nothing. Here are my calls in the ajax tab where #product and #new-category are the select elements:
$(function(){
...
How can I get the latest entry by the latest DATE field from a MySQL database using PHP?
The rows will not be in order of date, so I can't just take the first or last row.
...
I want to select only rows that are unique according to the column userid from a mysql table. So if I have two rows with the same userid none of them gets selected but if its only one it gets selected.
I use the following code:
SELECT T.id,T.name,T.userid FROM tbltest T WHERE userid NOT IN (SELECT userid FROM tbltest WHERE tbltest.id<>...
I'd like to be able to return all columns in a table or in the resulting table of a join and still be able to transform a date to a string by name.
For example
Select ID, DESCRIPTION, TO_CHAR(CHANGE_DATE,'YYYY-MM-DD HH24:MI:SS') AS FORMATED_DATE FROM MY_TABLE;
This is all well and good for just these three columns. But, the table will...
Hi there,
I have a T-SQL that works below:
SELECT WP_VTDID AS UTIL_VTDID,
(SELECT COUNT(WP_ENGINE) FROM WAYPOINTS WHERE (WP_ENGINE = 1) AND (WP_SPEED > 0) AND WP_VTDID='L083') AS UTIL_RUN,
(SELECT COUNT(WP_ENGINE) FROM WAYPOINTS WHERE (WP_ENGINE = 1) AND (WP_SPEED = 0) AND WP_VTDID='L083') AS UTIL_IDLE,
(SELECT COUNT(WP_ENGINE) FROM ...
I have an input form that lets me select from multiple options, and do something when the user changes the selection. Eg,
<select onChange="javascript:doSomething();">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
Now, doSomething() only gets triggered when the selection changes.
I want to trigger doSomethi...
Is there a better solution (using less code) for the following code snippet. It is something that I find myself doing a lot of in VB6 and was hoping to trim it down.
As I understand it Connection.Execute will not work
SQL = "SELECT SomeID FROM TableA"
RecordSet.Open SQL, Connection, adOpenStatic, adLockOptimistic, adCmdText
...
Hi
Is it possible to have an HTML select field where the OPTION text is of different colors?
<select>
<option>Black_text (yellow_text)</option>
</select>
I tried using an CSS SPAN element to color the text but that doesn't seem to work.
Any ideas?
UPDATE: Note, I'm trying to have multiple font colors on the same OPTION row. I've se...
Hi all,
I would like to create a table where the rows are selectable via jquery.
I'd also like to pass certain table cell values from a double click event on a row to another page.
Does any one have examples of how this would work?
Thanks in advance
...
I have to work with an analysis tool that measures the Web Service calls to a server per hour. These measurments are inserted in a database. The following is a snippet of such a measurement:
mysql> SELECT * FROM sample s LIMIT 4;
+---------+------+-------+
| service | hour | calls |
+---------+------+-------+
| WS04 | 04 ...
Is the following possible:
EXEC sp_Edu3_DeleteTreeStructure (SELECT TreeStructureId FROM TreeStructures)
The SP normally takes one argument. What I want is that the SP is executed for each TreeStructureId found by the Query.
thx, Lieven Cardoen
...
Hi all,
I have a GridView that is bound to an ObjectDataSource, and I am handling the full row select using the standard solution provdided all over of putting this line in the OnRowDataBound():
e.Row.Attributes["onclick"] = this.Page.ClientScript.GetPostBackEventReference(this, "Select$" + e.Row.RowIndex);
All of this is working swi...
Using Informix, I've created a tempory table which I am trying to populate from a select statement. After this, I want to do an update, to populate more fields in the tempory table.
So I'm doing something like;
create temp table _results (group_ser int, item_ser int, restype char(4));
insert into _results (group_ser, item_ser)
select ...
I couldn't find a proper discussion thread on this topic, so I'm going to go ahead and ask here.
Problem: I have a select query that returns a result of size 100,000+. The user wants to view all this data, but obviously I can't give it to him all at once. I also don't want to store so much data on the client's memory. I want the user to...
Hello, I am attempting to return the number of customers located in a specific state that have rented a specific movie, where the rents table contains two columns, one for customer ID and one for the movie ID. The function takes in a movie ID and the state and returns an integer with the amount of customers.
Right now I have an implemen...
Lets say we have a a text and i enter in visual mode and select a text and how do i quickly do a search for the highlight text and replace it with something else
thanks
...