Where in the Google Maps API docs can I find a table explaining the accuracy values of Geocode lookups?
Has the range of values changed in between V2 and V3?
Hi,
I've got table Articles
ID identity autoincement, IDArticle: nvarchar(100) ,IDCar nvarchar(100), createddate
How to convert this:
SELECT IDCar , MAX(createddate)
FROM Articles
GROUP BY IDCar
to get IDArticle
eg:
1 art1 BWM 5-21-2010
2 art2 BMW 5-24-2010
3 art3 BMW 5-31-2010
4 art4 Porshe 5-31-2010
5 art5 Porshe 6-1-2010
Expecting result is:
art3
art5
It's not duplicated with:
http://stackoverflow.com/questions/2736769/sql-query-number-of-occurance/2736809#2736809
I'm having some difficulty figuring out what is going on and how to fix it.
I have some divs that contain some icons that are causing a width problem when displaying tabular data. If I remove the div's that contain the icons, the row width ends up the way I want it (See the firefox example below).
Here's the view in Firefox which is what I want (notice the positioning of the icons circled in red, which is aligned on the same y coordinate, or thereabouts):
Here's the view in IE7 (Notice what happens to the icons and the width of the grey line, which is the table row):
Here's the HTML:
<table>
<tbody>
<tr>
<td>
<span>stuff 1</span>
<span>stuff 2</span>
<div class="prop_edit"><img class="img_height14" src="edit.jpg"></div>
<div class="prop_archive"><img class="img_height14" src="archive.jpg"></div>
<div class="prop_delete"><img class="img_height14" src="delete.jpg"></div>
<div style="display:none;">
<div>Links Here</div>
</div>
</td>
</tr>
</tbody>
Heres the CSS:
.prop_edit{
float:right;
position: relative;
top: 0px;
right:50px;
}
.prop_archive{
float:right;
position: relative;
top: 0px;
right:10px;
}
.prop_delete{
float:right;
position: relative;
top: 0px;
right: -30px;
}
.img_height14{
height:14px;
vertical-align:top;
position:relative;
}
I've tried a bunch of different css things, but really am just hacking away hoping to figure something out. Anyone got some tips that could help me?
Thanks in advance.
I've got a datagrid that is databound from a database table. How do I:
a) Edit the displayed value for a column using the values from other columns in the row? (For example, display a URL like:
<a href="/url?param=columnA">columnB</a>
where columnA is the value from column A and columnB is the value from columnB)
b) Add an additional column using values from the other columns (similar to a.)
I have a postgres table and a schema that creates a primary id (sequence) that auto increments by 1. How do I specify the starting value? I am happy with the increment value. Here is my schema migration:
create_table "ServiceProvider", {:primary_key => :ID} do |t|
t.integer "ID", :null => false
end
Thank you
I am using mysql and there are bulk inserts that goes on to my table.
My doubt is if I create a trigger specifying after insert, then the trigger will get activated for every insert after, which I do not want to happen.
Is there any way to activate a trigger after all the bulk inserts are completed?
Any advice?
Thanks.
I have set new division on postgress pg_operator table because i want tath when is division by zero return 0.
i have write this:
create operator / ( procedure = zero_division, leftarg = double precision, rightarg = double precision);
where zero_division is:
CREATE OR REPLACE FUNCTION zero_division(double precision, double precision)
RETURNS double precision AS
'select case when $2 = 0 then 0 else $1 / $2::real end;'
LANGUAGE sql IMMUTABLE
COST 100;
when i run value/ 0 i get error of division.
I have a table with 600+ columns imported from a csv with special chars % _ - in the column names, is there a way to change the column names to remove these special chars ?
the code can be tsql or tsql
I'm trying to declare an enum type based on data that I'm retrieving from a database. I have a method that returns a string array of all the rows in the table that I want to make into an enumerated type. Is there any way to construct an enum with an array?
This is what I tried, but from the way it looked in eclipse, it seemed like this just created a method by that name:
public enum ConditionCodes{
Condition.getDescriptions();
}
Thank you in advance!
Class.forName("org.sqlite.JDBC");
Connection conn =
DriverManager.getConnection("jdbc:sqlite:userdata.db");
Statement stat = conn.createStatement();
ResultSet rs = stat.executeQuery("SELECT * from table WHERE is_query_processed = 0;");
How can I find out if rs is empty?
Hi,
I'm developing JSP/Servlets App,and I want to execute a service at a specific time , for example :
For each day at 10:00 AM , delete any
attachment from the "attachment" table
in the database where column X== NULL.
How can I do this in JSP/Servlets application ?
I use Glassfish as a server .
In Mathematica I have a list of point coordinates
size = 50;
points = Table[{RandomInteger[{0, size}], RandomInteger[{0, size}]}, {i, 1, n}];
and a list of cluster indices these points belong to
clusterIndices = {1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1};
what is the easiest way to split the points into two separate lists based on the clusterIndices values?
For example I have:
create table a (i int);
Assume there are 10k rows.
I want to count 0's in the last 20 rows.
Something like:
select count(*) from (select i from a limit 20) where i = 0;
Is that possible to make it more efficient? Like a single SQL statement or something?
PS. DB is SQLite3 if that matters at all...
Lets assume my database table structure is something like
| items | weight |
|============|==========|
| item_1 | 50 |
| item_2 | 90 |
| item_2 | 45 |
| item_2 | 60 |
| item_3 | 40 |
In the select statement, I want to show an item only for once with the highest weight also ordered by height. So the result should be :
| items | weight |
|============|==========|
| item_2 | 90 |
| item_1 | 50 |
| item_3 | 40 |
I tried something like
SELECT DISTINCT items, weight FROM mytable ORDER BY weight DESC
but it didn't work because the results are actually distinct.
How can I make that selection?
Hi all,
I have 2 tables:
1. news (450k rows)
2. news_tags (3m rows)
There are some triggers on news table update which updating listings. This SQL executes too long...
UPDATE news
SET news_category = some_number
WHERE news_id IN (SELECT news_id
FROM news_tags
WHERE tag_id = some_number); #about 3k rows
How can I make it faster?
Thanks in advance,
S.
I need to use SQLite database file as a file for storing information, and I want to store the version of the file in the SQLite database file.
How can I do this? I mean, how to store unique (only one) data in SQLite? I don't want to use store the info by making table for this, as the version info is just one number.
Hi I have a table test as below
NAME
---------
abc1234
XYZ12789
a12X8b78Y9c5Z
I try to find out the count of number of numbers and characters in the string as
select name,length(replace(translate(lower(name),'abcdefghijklmnopqrstuvwxyz',' '),' ','')) as char_count,
length(replace(translate(name,'1234567890',' '),' ','')) as num_count
from test6;
Its executing fine giving the output
NAME CHAR_COUNT NUM_COUNT
abc1234 4 3
XYZ12789 5 3
a12X8b78Y9c5Z 7 6
But my question is there any option by not giving the abcdefghijklmnopqrstuvwxyz
and 1234567890 manually
i am using two table postjob and job location
want to distinct jobtitle
The query is:
select postjob.jobtitle,
postjob.industry,
postjob.companyname,
postjob.jobdescription,
postjob.postid,
postjob.PostingDate,
Job_Location.Location,
Job_Location.PostigID
from postjob
inner join Job_Location
on postjob.postid = Job_Location.PostigID
Where postjob.industry=' Marketing, Advertising'
output of this query
http://www.justlocaldial.com/Industry_search.aspx?ind=Marketing,%20Advertising
I have a table of purchases containing a user_id and a date_of_purchase.
I need to be able to select all the users who have made 2 purchases within 12 months of each other. The dates can be any point in time as long as they are less than 12 months apart.
e.g.
user_id date_of_purchase
123 01/Jan/2010
124 01/Aug/2010
123 01/Feb/2010
124 05/Aug/2008
In this example i want user_id 123
I hv a table like this:-
Item Model Remarks
-----------------------------------------
A 10022009
B 10032006
C 05081997
I need to copy the info from "Model" to "Remarks" with the following format:-
Item Model Remarks
-----------------------------------------
A 10022009 20090210
B 10032006 20060310
C 05081997 19970805
Thanks
Hi i have to select the 2 lastest element for every topic
ex:
table: msg
id | topic_id
-----------
1 | 1
2 | 1
3 | 1
4 | 1
5 | 2
6 | 2
7 | 2
8 | 3
i want obtain these rows:
3 1
4 1
6 2
7 2
8 3
How can i do?
thanks
table is bbc(name, region, area, population, gdp)
Some countries have populations more than three times that of any of their neighbours (in the same region). Give the countries and regions.
plese go ahead
I have two variable TO_DATE and FROM_DATE. My table has two fields DOJ and DOL. I want to select all the records whose DOJ < TO_DATE and DOL FROM_DATE.
How can i write an SQL query in for this??