database

MySQL Selecting wrong column value in Group By query

Here's a real noobish MySQL query problem I'm having. I have a high score table in a game I'm writing. The high score DB records a name, level, and score achieved. There are many near duplicates in the db. For example: Name | Level | Score | Timestamp (key) Bob 2 41 | 1234567.890 Bob 3 15 | 1234568.890 Bob 3 ...

Item numbering scheme

I am working on a project that requires documents to be associated with customers accounts. Each document must have a unique identifier. The scheme I am working on is in the format AAA-####. The alphanumeric part of the identifier will allow to track a date using three letters (vowels will be dropped to prevent obscene or offensive wo...

Is there any option for local database like Sqlite for j2me - CLDC devices?

Hi all, Is there any option for local database like Sqlite for j2me - CLDC devices? PerstLite and OpenBaseMovil are both under dual license. Is there any open source option for this? Or, any alternate way of developing application. ...

How do you make a geolocation database?

I am not asking what geolocation service to use or how you use them. I am asking, how the do these companies know so well where every IP address is?? Is there some breach of privacy being violated? I looked at the wikipedia page, and all they had to say was using the WHOIS service, which obviously doesn't work at all: my IP is owned ...

How to create unique row ID in sharded databases?

In a non-sharded DB, I could just use auto-increment to generate a unique ID to reference a specific row. I want to shard my DB, say into 12 shards. Now when I insert into a specific shard, the auto-increment ID is no longer unique. Would like to hear anyone's experience in dealing with this problem. ...

Application that works in both SQL Server And Oracle Databases

What is the best approach to build a small (but scalable) application that works with Sql Server or Oracle? I'm interested in build apps that supports multiple databases, in the process behind the feature. ...

Visual Studio 2008, Local Database, Diagramming.

I just installed Visual Studio 2008 and SQL Server 2008 on my machine - in that order. I note that VS insisted on installing SQL Server 2005 Express in order to be able to create a local database in by web projects. In any case, whenever I do add a local database and go to create a diagram, I cannot seem to modify the "Custom" table vi...

Simple data - I just need simple way to analyze

Summary I am after some advice on the easiest way to analyze simple data using SQL server and .net Details Really simple data - just need really simple way to analyze (with my simple brain) I have a SQL Server table: PKID (Int) ApplicationName (VarChar) MethodName (VarChar) TimeInMs (Integer) AdditionalInfo (VarChar) DateTime (Da...

LINQ Confusion - Database not persisting after the application closes?

I'm making a WinForms app in C#. When I go to create my database object, I'm presented with two options: Local Database Service-based Database All I want is a simple local database to use for my project. However, if I select "Local Database (Compact Edition)" then after I create my tables and drag them over to a LINQ-To-SQL Class...

Simple SSRS Report

After some reading and posting, I am fairly sure that I want to use SSDS to analyze some data I have. However, I could use some pointers to help me get going. I have a simple SQL Server table: * PKID (Int) * ApplicationName (VarChar) * MethodName (VarChar) * TimeInMs (Integer) * DateTime (DateTime) This table records the length of t...

How can I print a value in my page from Database

How do I display information in my page (take it from DB) in asp.net 2008 Currently I use GridView, but it display the information in a TABLE. I want to display it in a normal line. for example: I have this table in my DB http://www.rofof.com/img2/4jpqfn26.gif I want to print an information in my page as: You are A and your ID ...

Should I store Enum ID/values in the db or a C# enumeration?

Say my database tables have columns like UserType, SalesType, etc. Should I have database tables with UserTypeID, userTypeName or should I just create a C# enumeration? ...

How does one query for count() on a series of ranges at once?

I'm trying to compose a breakdown of forum ranks on a phpBB forum. Forum ranks are defined by your postcount: if you have between 1-9 posts you're level 1; 10-24 and you're level 2; and so on. (The maximum rank is anything above 2000 posts.) Right now, my forum rank statistics page is just doing a bunch of dumb queries: SELECT COUNT(...

Unique base class instance

Hi all, i'm developing a c++ dll that containts three classes: say base class Base, Derived1 and Derived2 class. The scenario: class Base { //ctor, dtor, members and methods here } class Derived1 : public Base { //ctor, dtor, members and methods here } class Derived2 : public Base { //ctor, dtor, members and methods here } T...

How to set the default value of an Access 2003 field using SQL?

How can I set the default value for a field using SQL in MS Access? I tried this but got a syntax error: CREATE TABLE HELLO ( MUN INTEGER NOT NULL, ADD CHAR(50) DEFAULT'16 asd ST.' ) ...

Sharepoint database and Tables

I had created a multi choice column called "technology" on our shreapoint portal. Recently, by mistake I clicked on delete button while making changes to the column value and now I want to restore the system in the orignal form. I have recreated the column with all the options, the problem is that all the documents had the technology val...

Which SQL query is better, MATCH AGAINST or LIKE ?

To search the database for rows that have both keywords "foo" AND "bar" in any of the columns "foo_desc" and "bar_desc", I would do something like: SELECT * FROM t1 WHERE MATCH (t1.foo_desc, t2.bar_desc) AGAINST ('+foo* +bar*' IN BOOLEAN MODE) or SELECT * FROM t1 WHERE (CONCAT(t1.foo_desc, t2.bar_desc) LIKE '%foo%') AND (CONCAT(t1.foo...

MySQL database replication

Hello; This is the scenario: I have a MySQL server with a database, let's call it consolidateddb. This database a consolidation of several tables from various databases I have another MySQL server, with the original databases, these databases are production databases and are updates daily. The company wants to copy each update/insert/...

[DB2] Order a select result case insensitively?

Is it possible to order the result of select query on a db2 database case insensitively? For example: I want to have all names that start with an "a" or "A" sorted together. Abraham aron andrea Annica brian Benjamin Now it's like this: aron andrea brian Abraham Annica Benjamin ...

Update Listbox

I have bound a ListBox to a SQL CE database with this code: ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:DatabaseWindow}}, Path=Database.Photos1}" This ListBox is populated properly. But when I try to insert a row into the database (InsertOnSubmit + SubmitChagnes), the ListBox is not up...