I have a scenario where I'm calculating something in the WHERE clause of my SQL, but I also want to get that calculation - since it's expensive. Is it possible to get the results of something done in the WHERE clause, like this:
SELECT `foo` FROM `table` WHERE (foo = LongCalculation(`column`))
Wishful thinking, or possible with MySQL?...
its Access database..
i have a Library table, where Autnm Topic Size Cover Lang are foreign Keys
each record is actually a book which has its properties such as author and stuff. i am not quite sure i am even using the correct JOIN.. quite new with "complex" SQL :)
SELECT Library.Bknm_Hebrew, Library.Bknm_English, Library.Bknm_Russia...
Hello,
I have few columns in my DataGridView, and there is data in my rows,
I saw few solutions in here, but I can not combine them!
simply a way to right-click on a row, it will select the whole row and show a menu with an option to delete the row and when the option selected it will delete the row
I made few attempts but none is wo...
Hi,
with $("#TextInputElement").select()
I am able to select a text (mark it) in an in an input text field.
Now I only want to select the text in between brackets in that input field.
I have the regular expression match(/-[^-]*-/) to select, but how would I apply this to only select the text inside the input field between brackets?
[...
Heya,
i want to create an application which will read a specific line from a text file and show it in a textbox. The line will be chosen according to the number of the listbox selection i will make.
Here's the code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase...
I have hierarchical data that I represent using the adjacency list model.
TABLE
ID
parentID
title
I am wondering, what is the simplest way to SELECT the number of immediate children for each node? If possible, I'd like to do this in a single select, yielding a resultset like so...
RESULTS...
ID title childCount
1...
I am stuck very badly at trying to make an SQLite query finish execution and currently have no bright ideas. Also, I am new to the field of writing SQL queries, and I am still learning the concept of database indexes, etc..
I am migrating an application from Access to SQLite and the query takes around 1 minute to run in Access. The quer...
Hi
I have a tcp server which uses the select call to multiplex reading from clients.
I have a client class (MClient) which manages the decoding of incoming data packets
while(1)
rlist, wlist, xlist = select( input_sockets, output_sockets, [] , 1)
for insock in rlist: #any clients????
if insock is server_socket:
...
string queryString = "SELECT SUM(skupaj_kalorij)as Skupaj_Kalorij "
+ "FROM (obroki_save LEFT JOIN users ON obroki_save.ID_uporabnika=users.ID)"
+ "WHERE users.ID= " + a.ToString() + " AND obroki_save.datum =?";
using (OleDbCommand cmd = new OleDbCommand(queryString,database)) ...
I have several different tables, but they all have 2 columns that are the same name. I want to write a stored procedure that searches one column in all of the tables and returns the result. Ideas? I'm fairly nub when it comes to SQL.
...
I' trying to get some data from Oracle via ODBC to mySQL database.
And then Insert some lines in mySQL database.
I manage to list the lines from ORACLE but fail to Insert into mySQL.
$time_start = microtime(true);
set_time_limit(10000);
//ligação ODBC ORACLE
$connect = odbc_connect("acatex32", "acatex", "acatex");
$query = "select b...
Hello there, this is a problem I'm currently facing :
I've made a
<select id="nationalityArea.id" tabindex="6" name="nationalityArea.id">
<option value="null"></option>
<option value="619">Îles Cook</option>
<option value="646">Îles Féroé</option>
<option value="625">Îles Salomon</option>
<option value="598">Îles Vierges Américaines</...
Hi,
I'm using jQuery UI Autocomplete 1.8.1 with Jquery 1.4.2 and I have this issue.
At first, I can't force the value of the Autocomplete input field, well this is not a big problem.
But I have this issue with it:
I doesn't act similarly when a user select a choice using mouse to using keyboard arrows. When using keyboard everythin...
its in ASP Classic. MS-Access DB.
i do: INSERT INTO Orders (userId) VALUES (123)"
what i want to retrieve is orderNumber from that row. its an auto-increment number.
so i did: SELECT orderNumber FROM Orders WHERE userId=123
but since it is on the same page, the SELECT returns: Either BOF or EOF is True, or the current record has bee...
I am using hibernate for Java, and I want to be able to select users by id or by name from the database.
Nice thing about Hibernate is that it caches the result by id, but I seem to be unable to make it cache by name.
static Session openSession = Factory.openSession();
public static User GetUser(int Id) {
return (User) openSessio...
Hi:
I need help to do this query select.
for example I have these fields:
idInvoice
date
amount
Depending of the date I need multiply the field "amount" for x number or other one.
For example, if the date is less 01/01/2010 to multiply for 20 . But if it is major or equal to multiply for 35
Select idInvoice, date, amount, amou...
Today I got into a debate with my project manager about Cartesian products. He says a 'natural join' is somehow much better than using 'select from where' because the later cause the db engine to internally perform a Cartesian product but the former uses another approach that prevents this. As far as I know, the natural join syntax is no...
<select onchange="$(self).siblings('input[type=text]').val( $(self).val() ); $(self).siblings('input[type=checkbox]').attr('checked','checked')">
that does not work
before the select box, there are these inputs (examples):
<input type="text" value="" id="product[14][value]" name="product[14][value]">
<input type="checkbox" value="1" ...
I´d like to SELECT a single value into a variable. I´d tried to following:
DECLARE myvar INT(4);
-- immediately returns some syntax error.
SELECT myvalue
FROM mytable
WHERE anothervalue = 1;
-- returns a single integer
SELECT myvalue
INTO myvar
FROM mytable
WHERE anothervalue = 1;
-- does not work, also tried @myvar...
Hello, I have simplified my page and here what I have:
<html>
<head>
<meta http-equiv="content-type" content="text/plain; charset=utf-8" />
<title>Title</title>
<style>
a {
text-decoration: none;
}
div select {
margin-top: 20px;
display: block;
}
</style>
<script type="text/javascript" src="http:...