select

Yahoo Query Language Problem

Hello everybody! Today, I've started with Yahoo Query Language. I would use it to retrive stocks details, so I'm talking about Yahoo Finance. I think there is a bug on this language. This is my query: select * from yahoo.finance.quoteslist where symbol='@^GSPC' I ALWAYS get 51 results! it's impossible, take a look at: http://...

Matlab- select data from a 3d plot

Hey, I have a 3d plot. I want to select a certain area in the plot and get the points within this area into a variable. Is that possible? Thanks, Li ...

How to check whether a mysql select statement result has a value or not in php?

I have a textbox UserName and a Check Availability button next to it..... I have checked the availability by passing UserName textbox value..... But it doesn't seem to work.... Here is what i am doing? echo $UserName = $_GET['CheckUsername']; $_SESSION['state'] = $State; $queryres = "SELECT dUser_name FROM tbl_login WHERE dUser_name='$...

Select *, max(date) works in phpMyAdmin but not in my code

OK, my statement executes well in phpMyAdmin, but not how I expect it in my php page. This is my statement: SELECT `egid`, `group_name` , `limit`, MAX( `date` ) FROM employee_groups GROUP BY `egid` ORDER BY `egid` DESC ; This is may table: CREATE TABLE `employee_groups` ( `egid` int(10) unsigned NOT NULL, `date` date NOT NUL...

Send select's values in array

Hello, I have such select list in html: <input type="checkbox" name="drive_style" value=1 checked />123<br /> <input type="checkbox" name="drive_style" value=2 />123<br /> <input type="checkbox" name="drive_style" value=3 checked /> 123<br /> <input type="checkbox" name="drive_style" value=4 />123<br /> <input type="checkbox" name="driv...

Before after select event validation and results with jquery

I am using a javascript function (F) (jquery )which uses 3 select values selected by the user to calculates a value - R(result) R is a number ranging from (1 through 9), (11) and (22); I need 2 extra steps one before the calculation and one after. a. Before calculation takes place: Make sure all three select values are changed before...

Displaying SQL results using PHP

Hi, I have an SQL query that returns an amount of tuples (about 50). Now I need to display the results, 15 tuples at a time, then I will have a "view more" button to view the next 15 results. Can you please help me how I can make this? The issue is that I cannot use the 'limits' because each time I run the query the results will be dif...

Using jQuery to disable function untill all selects are changed

I am using a javascript function (F) (jquery )which uses 3 select values selected by the user to calculates a value - R(result) R is a number ranging from (1 through 9), (11) and (22); I need 2 extra steps one before the calculation and one after. a. Before calculation takes place: Make sure all three select values are changed before ...

MySQL SELECT Statment issue

Hi, I have the following query which returns 2 tuples SELECT bar_id, bar_name, town_name, bar_telephone, subscription_type_id, pic_type FROM towns, subscriptiontype, regions, bar LEFT JOIN barpictures bp ON bar.bar_id = bp.bar_id_fk WHERE town_id = town_id_fk AND bar.test_field = 0 AND subscription_type_id = subscription_type_id_fk AND...

read first 1kb of a blob from oracle

Hi, I wish to extract just the first 1024 bytes of a stored blob and not the whole file. The reason for this is I want to just extract the metadata from a file as quickly as possible without having to select the whole blob. I understand the following: select dbms_lob.substr(file_blob, 16,1) from file_upload where file_upload_id=504;...

how to diffrentiate between same field names of two tables in a select query??

i have more than two tables in my database and all of them contains same field names like table A table B table C field1 field1 field1 field2 field2 field2 field3 field3 field3 . . . . . . . . ...

SQL SELECT with time range

Hi, I have below click_log table logging hits for some urls site ip ua direction hit_time ----------------------------------------------------- 1 127.0.0.1 1 20010/01/01 00:00:00 2 127.0.0.1 1 20010/01/01 00:01:00 3 127.0.0.1 0 20010/01/01 00:10:00 .... ......... ...

Insert Data from to a table

I have a table that lists number of comments from a particular site like the following: Date Site Comments Total --------------------------------------------------------------- 2010-04-01 00:00:00.000 1 5 5 2010-04-01 00:00:00.000 2 8 ...

MySQL SELECT INTO OUTFILE to a different server?

I have a shell script on server a. The script spits out a csv file to a local directory. The problem is the database server is on server b. How do I use select * into outfile in a setup like this? I get Can't create/write to file '/home/username/test.csv/' (Errcode: 2) Solved load data infile by using 'LOCAL' keyword. Is there somet...

MySQL Query: How to select rows that don't have a certain value?

I am having trouble writing a query and I don't even know if it is possible. Take this table for example: id group active 1 A NO 2 A YES 3 A NO 4 B YES 5 B NO 6 C NO 7 C NO Table above is just an example. In real table there are much more columns the those t...

How to write this query in Linq2Sql

I have a table company which holds the company_id, company_name and other details. I have a table subcontracts which has a company_id column that maps to company.company_id. How can I write a select statement to get all active companies which have not been assigned to an active subcontract? IE The company_id cannot be found in subcont...

Php, mysql selection

I have this table ATTRIBUTE id name um 12 capacity MB;GB;TB And this table2 : id id_attribute id_product name value um 1 12 40 hdd maxtor 30 GB 2 12 41 hdd maxtor 40 GB 3 12 42 hdd y 1 TB How can i...

How to select distinct field values using Solr?

I would like to do the equivalent of this SQL but with Solr as my data store. SELECT DISTINCT txt FROM my_table; What syntax would force Solr to only give me distinct values? http://localhost:8983/solr/select?q=txt:?????&amp;fl=txt EDIT: So faceted searching seems to fit, but as I investigated it, I realized I had only detail...

MySQL: Complex Join Statement involving two tables and a third correlation table

I have two tables that were built for two disparate systems. I have records in one table (called "leads") that represent customers, and records in another table (called "manager") that are the exact same customers but "manager" uses different fields (For example, "leads" contains an email address, and "manager" contains two fields fo...

How to change this mysql select into sql server select statement?

I use this mysql statement for concating description which has a length greater than 30.. select if (CHAR_LENGTH(description)>30,CONCAT(SUBSTRING(description,1,30), '.....'),description) as description from table How to change this mysql select into sql server select statement? ...