I'm trying to test a developer's application against a SQL Server 2005 database (80) instead of the normal SQL Server 2000 database that it would hit.
Is anyone aware of issues that could cause this error that are related to SQL?
'DateInterval.minute' is not a recognized dateadd option.
Description: An unhandled exception occurred dur...
I have a SQL Database that I am going to be interacting with via LINQ once built.
It has a client who has (ignoring the others) two fkID fields to two tables.
Class Country
What I am trying to do is store a "Rules" table where the following happens:
if the Class is 'A' and the Country is 'USA' then
create rows 'RowsA' in...
Here's a sample of what I'd like to do.
The stored procedure fails to create while the LIMIT is present on the query.
If I take the LIMIT off the procedure creates.
CREATE PROCEDURE LimitTest(IN in_start INTEGER UNSIGNED, IN in_limit INTEGER UNSIGNED)
BEGIN
DECLARE no_more_results INTEGER DEFAULT 0;
DECLARE var_result INTEGER UNS...
What would cause a query being done in Management Studio to get suspended?
I perform a simple select top 60000 from a table (which has 11 million rows) and the results come back within a sec or two.
I change the query to top 70000 and the results take up to 40 min.
From doing a bit of searching on another but related issue I came ...
I've got two tables in SQL, one with a project and one with categories that projects belong to, i.e. the JOIN would look roughly like:
Project | Category
--------+---------
Foo | Apple
Foo | Banana
Foo | Carrot
Bar | Apple
Bar | Carrot
Qux | Apple
Qux | Banana
(Strings replaced with IDs from a higher normal...
I have created a .NET application designed to use the RemoveFromSQLServer function to delete DTS packages from a SQL server. This is the entirety of the code:
Sub Main()
Dim app As New Application
app.RemoveFromSqlServer("dts_rob_temp", "MyServer", Nothing, Nothing)
End Sub
When I try to run it, I get the below fairly undescri...
Hello everyone.
I have found this project on Codeplex.
http://www.codeplex.com/ProjNET
I need to integrate this code with Sql Server 2008, and found a similar project on the Web
http://sqlspatialtools.codeplex.com/
The second one can be bound to Sql Server. What do i need to do, to "bind" the first one, the same way as the first?
E...
I have a table that contains a StudyId, a PatientId, and a StudyStartDateTime. I'd like to graph the totals of the Studies and Patients between two dates specified by the user. The problem is with counting distinct values. Here is the query:
SELECT
s.StudyStartDateTime,
COUNT(s.StudyId),
COUNT(s.PatientId)
FROM
dbo_St...
Consider
create table pairs ( number a, number b )
Where the data is
1,1
1,1
1,1
2,4
2,4
3,2
3,2
5,1
Etc.
What query gives me the distinct values the number column b has So I can see
1,1
5,1
2,4
3,2
only
I've tried
select distinct ( a ) , b from pairs group by b
but gives me "not a group by expression"
...
Hello,
What is the easiest way to remove multiple DTS packages from SQL Server 2008?
Thanks.
...
Assuming that there's a table called tree_node, that has the primary key called id and has a nullable column called parent_id and the table embeds a tree structure (or a forest), how can one compute the depth of a node in the tree/forest in an efficient way in SQL?
...
I have a table:
ID A B C D
1 10 20 30 5
2 332 80 32 12
3 41 20 82 42
.
.
.
I want to query that gives me
A B C D
Where A contains the average of column A for the top 30 rows of the table, sorted by ID ascending, B contains the average of column B for the top 30 rows of the table, sorted by ID asce...
I am using Angel LMS and its built on a SQL Server platform. I believe its 2005, but not 100% sure about that.
Anyway, maybe my pseudo-code will shed light on that answer. Also single quotes must be used for strings and the concatenate character is +.
I need to have something run 2-5 times a day (the frequency is not determined yet...
Is it possible to enumerate the currently-defined session variables? I've been looking for the equivalent of
select * from sys.tables
for session variables, but I can't find a sys view that contains that information. I'm wondering if it's possible to spin through them and print them to the response window. I've got about 35+.
...
The following T-SQL code segment works but i'm wondering if there's a cleverer and/or less verbose way to accomplish the swapping of field values between two different rows. (The code has hard-coded pkey values for simplicity.)
BEGIN TRAN;
declare @swapFormSeqA int;
declare @swapFormSeqB int;
SELECT @swapFormSeqA = DisplaySeq
FROM Cus...
I have a table like this:
create table foo ( a number, b number )
I want to update all the columns from a with the value that is in another table
create table bar ( x number, y number )
So, if this would be a procedural programing language I would:
foreach foo_item in foo
foreach bar_item in bar
if( foo_item.b =...
I have a form in which I enter a record and I have a field that automatically updates with the current date. I would like to add a subform that tells me how many records have been entered "today" based on current date (today's date). I would like it to keep a running total. I am new to asking questions in this format and appreciate any h...
$result=mysql_query("SELECT * FROM playerlocations WHERE player<>'0'");
$returntext="";
while($row=mysql_fetch_array($result))
{
if($returntext!=""){$returntext.="&";}
$returntext.=$row['player']."#".$row['locations'];
}
the error message claims that $result isn't a valid result set. I tested it in phpmyadmin, and it worked. I don't ...
let's say that i get a resultset which was queryed using joins from an sql database. is it better to use an sql statement to update the tables or insert new tuples/rows? or should i use the resultSet.update() function? i just want to know the drawbacks associated with each as well as the preferred method of updating tables.
...
I have to get a list of limits for a the sub-parts of a level 1part. Limits for some parts are null, and for those null parts, I have to query the level 2 parts that are on that part and give the MIN of the limits of those level 2 parts. For some of the level 2 parts, I have to get the MIN of their sub-parts (the level 3 parts on that ...