In my free time I started writing a small multiplayer game with a database backend. I was looking to separate player login information from other in game information (inventory, stats, and status) and a friend brought up this might not be the best idea.
Would it be better to lump everything together in one table?
...
I'm trying to perform a bitwise NOT in SQL Server. I'd like to do something like this:
update foo
set Sync = NOT @IsNew
Note: I started writing this and found out the answer to my own question before I finished. I still wanted to share with the community, since this piece of documentation was lacking on MSDN (until I added it to the C...
I basically have an xml column, and I need to find and replace one tag value in each record.
...
How do i delete all the tables in the schema on Apache Derby DB using JDBC?
...
I get the Total length of columns in constraint is too long. erro from the following
sql] Failed to execute: CREATE TABLE GTW_WORKFLOW_MON ( WORKFLOW_NAME VARCHAR(255) NOT
NULL, WORKFLOW_LOADED NUMERIC(20) NOT NULL, ACTIVITY_NAME VARCHAR(255) NOT NULL, FLAGS
INTEGER NOT NULL, MONITOR_NAME VARCHAR(255) NOT NULL, CLASSNAME VARCHAR(2...
I am trying to create a table with the following
CREATE TABLE GTW_WORKFLOW_MON ( WORKFLOW_NAME VARCHAR(255) NOT
NULL, WORKFLOW_LOADED NUMERIC(20) NOT NULL, ACTIVITY_NAME VARCHAR(255)
NOT NULL, FLAGS INTEGER NOT NULL, MONITOR_NAME VARCHAR(255) NOT NULL,
CLASSNAME VARCHAR(255) NOT NULL, STR0 VARCHAR(255), STR1 VARCHAR(255),
STR2 VARCHAR(...
I'll go first.
I'm 100% in the set-operations camp. But what happens when the set logic
on the entire desired input domain leads to a such a large retrieval that the query slows down significantly, comes to a crawl, or basically takes infinite time?
That's one case where I'll use a itty-bitty cursor (or a while loop) of perhaps most d...
I just want a simple tool that will help me quickly write scripts/packages that I can schedule to run. My transform requirements are pretty simple (changing column names, merging/splitting tables, and date conversions). I'll sacrifice flexibility for speed of development on this one.
Any come to mind?
...
I have a photo website and i want to support tags as my original category bucketing is starting to fail (some pictures are family and vacations, or school and friends). Is there an agreed tagging db schema?
I still want to support having photos as part of an album.
Right now i have a few tables:
Photos
PhotoID
PhotoAlbumID
Captio...
Is there any easy way to retrieve table creation DDL from Microsoft Access (2007) or do I have to code it myself using VBA to read the table structure?
I have about 30 tables that we are porting to Oracle and it would make life easier if we could create the tables from the Access definitions.
...
Which of these queries is the faster?
NOT EXISTS:
SELECT ProductID, ProductName
FROM Northwind..Products p
WHERE NOT EXISTS (SELECT 1 FROM Northwind..[Order Details] od WHERE p.ProductId = od.ProductId)
Or NOT IN:
SELECT ProductID, ProductName
FROM Northwind..Products p
WHERE p.ProductID NOT IN (SELECT ProductID FROM Northwind..[O...
Hi,
I have an Oracle server (version 9, I believe) and a MS SQL server (version 2000). The MS SQL server is running MS Windows Server 2003.
I would like to use DTS to extract some data from the Oracle server and pour it into the MS SQL server. I'm having problems finding out what driver I should install on my MS SQL server for it to b...
Hi, what is the easiest way to copy the all the values from a column in a table to another column in the same table?
...
I'm looking for a query which will return me an extra column at the end of my current query which is the count of all columns within the return set which contain a null column. For example:
Col 1 - Col 2 - Col 3
A B 0
A NULL 1
NULL NULL 2
Is there a simple way to get this return set based on the row values r...
Given an SQLConnection object how can you get a schema for a single table?
I was trying this the other day and I seemed to be able to get the schema from a DataSet which I'd gotten from running a query, but all the schema info I could get from the connection seemed to be related to what tables were available and not the actual details o...
I use SQL Server Management Studio 2005(SSMS) for most of my T-SQL and general SQL DB maintenance, but one thing that I would love to change is the level of detail the title bar gives you about each instance of SSMS you have open.
I would love to be able to see the connected server from the active tab at the very least.
e.g.
Any i...
Please note that the same question already has been asked in http://stackoverflow.com/questions/111341/combine-multiple-results-in-a-subquery-into-a-single-comma-separated-value, but the solution involves creating a function. I am asking if there is a way to solve this without having to create a function or a stored procedure.
I have ...
I have a table that records a sequence of actions with a field that records the sequence order:
user data sequence
1 foo 0
1 bar 1
1 baz 2
2 foo 0
3 bar 0
3 foo 1
Selecting the first item for each user is easy enough with WHERE sequence = '0' but is there a way to selec...
I recently inherited a database on which one of the tables has the primary key composed of encoded values (Part1*1000 + Part2).
I normalized that column, but I cannot change the old values.
So now I have
select ID from table order by ID
ID
100001
100002
101001
...
I want to find the "holes" in the table (more precisely, the first "hol...
If I wish to simply rename a column (not change its type or constraints, just its name) in an SQL database using SQL, how do I do that? Or is it not possible?
This is for any database claiming to support SQL, I'm simply looking for an SQL-specific query that will work regardless of actual database implementation.
...