In a C# app I am pulling a message off of a SQL service broker queue with the below statement.
When attempting to convert the message_body to SqlBytes and other types an exception is thrown. At runtime message_body always seems to begin as type byte[].
Leaving message_body as a byte[] works but I get an exception complaining of an erro...
Why won't this work? I keep getting that error.
// Setup forum topics, post count and last post xxxxx
$query = array(
'SELECT' => 't.subject',
'FROM' => 'topics AS t, pbb_forums AS f',
'WHERE' => 't.last_post_id = f.last_post_id');
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
...
I have to search a DB2 database for a string that is a concatination of two columns. Is there a way to CONCAT the columns then use the combined string in the WHERE clause? I've searched but can't seem to find an answer to this.
Thanks
...
Table1
...
LogEntryID *PrimaryKey*
Value
ThresholdID - - - Link to the appropriate threshold being applied to this log entry.
...
Table2
...
ThresholdID *PrimaryKey*
Threshold
...
All fields are integers.
The "..." thingies are there to show that these tables hold a lot more imformation than just this. They are set up this way for ...
I believe its possible to run SQL 2000 DTS packages on 2008 with a compatability layer. But is it possible to do the same with DTS packages created on SQL 7? Is there any MS KB or note that points out if this is even a possibility.
...
This question is based on this other question of mine, and uses all of the same basic info. That link shows my table layouts and the basic gist of the simple join.
I would like to write another query that would select EVERY record from Table1, and simply sort them by whether or not Value is less than the linked Threshold.
Again, I ...
Towards the bottom of the SQLNativeSql() function documentation it seems to be indicated that ODBC drivers perform translation.
It says:
The following are examples of what SQLNativeSql might return for the following input SQL string containing the scalar function CONVERT. Assume that the column empid is of type INTEGER in the data so...
I've been hearing things about NoSQL and that it may eventually become the replacement for SQL DB storage methods due to the fact that DB interaction is often a bottle neck for speed on the web.
So I just have a few questions:
What exactly is it?
How does it work?
Why would it be better than using a SQL Database? And how much better i...
I understand that if I instantiate a SqlConnection object, I am really grabbing a connection from a connection pool. When I call Open(), it will open the connection. If I call the Close() or Dispose() method on that SqlConnection object, it is returned to the connection pool.
However, that doesn't really tell me if it's really closed,...
I'm using a database as a kind of cache - the purpose is to store currently known "facts" (the details aren't that interesting). Crucially, however, I'd like to avoid inserting duplicate facts. To do so, the current data access code uses insert or ignore in many places.
I'd like to use the entity framework to benefit from it's managea...
My memory is failing me. I have a simple audit log table based on a trigger:
ID int (identity, PK)
CustomerID int
Name varchar(255)
Address varchar(255)
AuditDateTime datetime
AuditCode char(1)
It has data like this:
ID CustomerID Name Address ...
I have two tables, each with three boolean (ms-access "Yes/No") columns.
Table 1: A1, B1, C1
Table 2: A2, B2, C2
I would like the rows from Table 2 given a specific row from Table 1 that satisfy the following conditions:
If A1 is true then only rows where A2 is true, if A1 is false then rows where A2 is true or false.
If B1 is true t...
For this question, consider an application using a multi-tennant database with modeling of manufacturers and models. If we're talking about cars then the manufacturers would be Ford, Chevrolet, BMW, etc. and the models would be F-150, Camaro, and M3.
Relationship of model to manufacturer is many to one. Data for each tenant is separ...
I imported a bunch of tables from an old sql server (2000) to my 2008 database. All the imported tables are prefixed with my username ex: jonathan.MovieData. In the table properties it lists 'jonathan' as the db schema. When I write stored procedures I now have to include 'jonathan.' in front of all the table names which is confusing...
Hi,
I am facing some problems converting the PHP SQL insertion code below to ASP, I want to use the same concept in ASP, because it is more flexible, not tied to ASP owned keywords.
Wonder if anyone can help ASP newbie here.
$table = 'tbluser';
$array = array (
'name' => $name,
'email' => $email,
'ip' => $remoteIP
...
SELECT *
INTO Temp3
from
( SELECT B.Name
FROM [Temp2] as B
WHERE B.Name
Not IN (
SELECT E.WorkerName
FROM WorkerDetail as E ) )
Why does this produce an error?
...
Hi,
I have 5 databases (Queens, Brooklyn, Manhattan, Staten Island, Bronx). All 5 of these are Access databases. There was originally just one database but I broke it into 5 because the original file was 2GB. I have created a list of about 3000 names that I want to search through the five databases. This list is in an Excel spreadsheet ...
hi
i have a db with records with date (timestamp)
i need to select 10 records for each day (there are many more per day)
and order them by few columns...
how should that query look like?
...
I have a product table with 100000 products and also I have a user table with 5000 records. and suppose a user can give us feedback about any combination of this products. So suppose he chooses to compare products 1,3,100,200,400,500 and so on. (he can send us another feedback about some other products)
So here is my question, I just wa...
In an MMORPG server I am refactoring, I have two tables. One for items, and one for spells. Each item has up to 5 spells, so I went with a sparse-matrix format, having 5 columns for spell IDs.
The original devisers of this structure chose to use MyISAM which does not support referencing, causing the items table to contain items with non...