Hi,
I have a query that I'm running on two equivalent databases, but hosted on separate MS SQL 2005 servers. I want to measure the time of a query on both servers, and thus tried the following:
SET STATISTICS TIME ON
GO
SELECT TOP 10000 *
FROM table
GO
SET STATISTICS TIME OFF;
GO
And got the following result:
SQL Server parse and...
Does a Join table (association table) have a primary key ? many to many relationship. I've seen some Join tables with a primary key and some without can someone please explain when you would have a primary key in a join table and why?
Thank you in advance;-)
...
What is the best way to store Binary data (images, pdf's, mp3's, videos ect) in mysql and why? What i would love to know is how you do it(as developers) and why? Also how the big sites do it?
Thank you in advance ;-)
...
Hi,
I have very limited access to the SQL Server at my ISP.
I have a very simple tool to create databases and execute SQL (which is enough most of the time) but now I also want to backup (and in the case of an accident, restore) a database from my own PC (or via a web application, if that's possible, both are ok)
Is there a tool which...
Hello everyone!
How do I check is argument in SP Empty Guid or not?
Thanks.
...
Hi friends!
I'm developing small application for my colleagues, I have some procedure on SQL Server, which returns XML. And I'd like to publish this XML on the Web server.
I think that should exist easy way to do it, but I can find it.
I have the following setup:
SQL Server 2005 Standard
IIS 7
Windows Server 2008
best regards
...
Hi 2 all,
I am going to create integration tests for my application. I want that my integration tests will be executed not in production DB. I want that before test execution begin, my continues integration server (team city) creates copy of my database and integration tests will be executed on it. Any approaches or best practicies ?
E...
Hi im getting the result of the following ng Query like this
select Escuser,Eslevel from WF_UserConfiguration
Escuser Eslevel
--------------------
A000 1
A010 4
A021 3
ABCD 1
C067 3
C099 1
C252 2
My problem is i want to get the result ...
I have a database table that stores document information (DocID, Name, Type, Owner, etc). Then I have another table that stores the times the document has been downloaded (DocID, DownloadTime, etc). I'm trying to set up a page for recording the number of hits that different kinds of documents (policies, forms, publications, etc) get in a...
I have an application that needs to return search results from a SQL Server 2008 database. I would like to use a single stored procedure to return the results but I am finding that as I build the stored procedure it is full of many Else .. Else If statements with the query repeated over and over with slight variations depending on the us...
I have geographic data that was loaded into the geography datatype. For very specific purposes, I now need to have store this as a geometry. However, I need to perform a query like this.
DECLARE @radius INT -- e.g. 3000 metres
DECLARE @geo geometry -- my starting shape
SET @geo = @geo.STBuffer(@radius) -- this obviously doesnt work.. ...
Hi,
My problem is really simple.
I have a .bak file that contains one or more backup set.
When I'm using SMO to restore the database with this .bak file, it only takes the first backup set to do its work. It seems to ignore the remaining sets.
Why's that ?
See my code :
//Sets the restore configuration
Restor...
I'm trying to find out what is updating the value of a column and i have very little knowledge of the application. At a quick glance I've noticed about 90% of the applications business logic is handled on the database. Needless to say the depth of SP's, functions, and triggers is crazy.
I'd like to create a trigger on the table in quest...
I have a linked server from sql 2008 to an access database that works but then fails after a period of time. We have found restarting sql server fixes this issue. Does anyone know why this would occur. Some additional info that may help is that the applications that use the 2 database are not used for several days (due to non operating...
Hello,
I've got a SQL request that takes very long time to execute. So I want to make it better but don't known how to do it.
Here is an example:
My request:
SELECT * from T1
Inner join T2 on T1.a = T2.b
Inner join T3 on T2.c = T3.d
WHERE 1=1
AND T2.e = 'a certain value' --I call i the Clause1
and dbo.MyUDF(T1.id) = 1 --I call i...
Is there a relatively simple way to insert multiple rows into a table in which the data being inserted comes from both a select statement and hard-coded data?
For example,
insert into tblB
(field1, field2, field3)
values
( 950, select fieldA, fieldB from tblA )
...where 950 is a hard-coded value and fieldA and fieldB come from...
I need to insert multiple row's into sql server database (100 at a time) from my java code. How can i do this..? Currently i am inserting one by one and this does not look efficient...
Kaddy
...
We've been seeing this problem for a while now and I'm really trying to wrap my head around what's causing it.
A couple of times a day we'll see periods where web pages start throwing "[Microsoft][ODBC SQL Server Driver]Timeout expired" then shortly afterward pages start throwing "[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server ...
Hello, I've found it very weird that simple code like this is not valid:
select * from table where field=true
The alternative apparently being
select * from table where field='true'
Ok, guess I can live with that. For one reason or another I needed to do something like this recently:
select true as somefield,...
The alternative ...
I want to execute a query in which I rename one of the columns using the 'AS' statement and reuse that aliased column name within the 'WHERE' statement. Below is an example:
SELECT lat AS latitude
FROM poi_table
WHERE latitude < 500
The problem here is that SQL Server does not like this query because of the WHERE clause and the AS s...