I have a php file which stores an image in a BLOB in a Database. The uploading part works fine. However it won't display the image and I don't know why. Help appreciated.
I have a table with more than 8 millions record (geonames). Inside this table there are 19 columns, 2 of them are latitude and longitude.
I wish to find nearest place from latitude and longitude ...
I have the following and it returns 5 rows instantaneously:
WHERE MfgID = 30023
GROUP BY CollID
But, then when I do the following, it takes 9 seconds:
Is there a way to insert rows based on a query with multiple rows result?
Something like this:
For each row in (select brand, date from table_A where ...) insert into table_B (field_1, field_2) ...
MS Access database is located on the sahred drive and when I do ~500,000 queries the process takes a long time (if compared to access database that is local in my test env.)
Is there any 'trick' to …
I have a query that uses a CASE statement to score accounts. The query looks for values that are in a vector form. So for instance if I am a patient I can have multiple diagnosis codes, but they are …
Please advice me as I'm trying to move the linked server (Providers with the tables in Catalogs) from SQL server 2005 to another upgraded sqlserver 2008, I scripted out everything from there, but not …
I have a table A
and table B
I want to …
I am trying to compute the sum of a column which counts values of another number column. The specific column I want to compute the sum of is 'COUNT(d.totalcostofrent).
I just can't get the sum to ...
I have a small website with couple different forms inserting data to sql. But the users have problem with it. The problem is that they seem to be going through them too fast that its not recording ...
I have a database that I had to move from MS SQL over to MySQL. I was able to migrate it over and get things (mostly) up and running, but the performance has taken a big hit on the following query.
Im newbie in java and need help with getting rid of a comma in an sql query. anyone who can guide me in the right direction?
query = "UPDATE " + tablename + " SET ";
for(int i=0; i< ...
I have a kind of big postgresql database and two backup files (each uncompressed dump file ~56 mb) representing 2 states of the data in time.
1st state - backup from a couple days ago
2nd state - …
I would like to know how to use one side of a union and not the other. So look at the following SQL query:
SELECT * FROM users WHERE username = 0 and 1=2 UNION SELECT table_name,2,3 from ...
It seems that it is not straightforward for reordering columns in a sqlite3 table. At least the sqlite manager in firefox does not support this feature. For example, move the column2 to column3 and …
I want to retrieve content content based on their time stamp. And my query is
SELECT link,title,timestamp,photo,link,author,comments FROM posts
WHERE timestamp='*Todays Date -1*' LIMIT 6
I have a query that counts all Work ID Numbers by month and year and then creates a chart for the past 13 months using jpgraph. It works great except there are no Work ID Numbers in July so the chart …
when i select any radio button on this form in index.php ,the condition for the value in radio button is not validated for the correct answer
<?php $response=mysql_query("select * from ...
I've got this little block of code in a code-behind form:
using (SqlConnection connection1 = new SqlConnection(str))
using (SqlCommand cmd = new SqlCommand("usp_select_claim_id_MERGE", ...
I want to export data from a database Azur to an Excel file.
To do this, i use the command :
bcp [DatabaseName].[Table] OUT C:...\Test_Export.xls -c -U UserName@ServerName.database.windows.net -S …
I'm trying to write a query that groups some records if one field has a specific value and returns a count of the grouped records in place of one of the fields. I've got this so far:
SELECT DISTINCT …
create table Board (
boardID char(30) not null,
readLevel tinyint not null,
writeLevel tinyint not null,
PRIMARY KEY (boardID) ) engine=InnoDB character set=utf8;
create table Post (
I have a Windows 2008 R2 Domain/Forest functional level environment with an OpenVPN Access Server (v22.214.171.1240) that is Active Directory integrated and working smoothly. I've been working with our DBA …
Please advise on how to migrate my local mysql server to the cloud.
Currently I have a Fedora linux box and a NAS attached to it via ethernet.
I believe the best way to go about it is :
Take a ...
I need to change the primary key of a table to an identity column, and there's already a number of rows in table.
I've got a script to clean up the IDs to ensure they're sequential starting at 1, …
Ive been trying to return values from a SQL query but it always has the value 0, not null. I've tried to find answers on both Google and SO, but I've found nothing.
Also, the database is working, as …
I have four tables called: dw_location, dw_time, dw_crime and dw_crime_fact.
dw_location contains the columns area_id and area_name.
dw_time contains the columns time_id and year.
dw_crime contains …
There are two distinct targets, Deploy and Publish, in SSDT project alongside Build but I can't find anything on what's the difference between them and which one should be used when? From what I can …
I have the following code, using pscyopg2:
sql = 'select %s from %s where utctime > %s and utctime < %s order by utctime asc;'
data = (dataItems, voyage, dateRangeLower, dateRangeUpper)
rows = …
I created a JSP Login page. And I am checking the username and password with the mysql database in it.
When I try to login the page with wrong username and password.. it is not showing any error..