The following SQL run against a table with 1 million records is giving the same value for columns Date1 and Date2, and it took 38 seconds to execute. Is this an expected behavior and why?
CREATE FUNCTION Fn_Test(@a decimal)RETURNS TABLE
AS
RETURN
(
SELECT @a Parameter, Getdate() Date1, PartitionTest.*
FROM PartitionTest
);
SELE...
I am using JMeter to test our application 's performance. but I found when I send 20 requests from JMeter, with this the reason result should be add 20 new records into the sql server, but I just find 5 new records, which means that SQL server discard the other requests(because I took a log, and make sure that the insert new records are ...
Hi, I am creating a report. In that I am displaying total no of leads, leads sent via Fax and Leads sent via SMS. I wrote a procedure to fetch the records . Here I have to check an condition that both Leads sent via SMS and Leads sent via Fax should not be zero. If both are zero I should not fetch the record. If one of them has any value...
I used Linq to insert objects into database.But if i used threads to simultanously create 20 object within 1 second, then system will fail to add 20 objects into database.
And I found it is not because of the sql server 's limit. so the only possible is Linq, any one have idea ? How can I create 20 records or more in 1 second within 1 s...
When i install the Sql Server 2008 in my PC, i got the error prompt.
The error message is
object reference not set to an instance of an object
My pc is running on Windows Xp Professional SP2.
...
hi, i have a sitaution where i need to compare time in two diff rows,its like this
categoryid item_id group date
1 10 abc 2008-03-07 03:02:00
1 35 bcd 2008-04-03 10:03:00
2 13 cde 2008-03-13 07:18:00
2 40 ced 2008-03-13 08:41:00
2 44 cef 2...
How does the collation impact SQL Server in terms of storage and how does this affect the Unicode and non-unicode data types?
Does the collation impact Unicode storage? or just govern sort rules within the database?
When I use the non-unicode data types what restictions are tied to the collation?
If restrictions apply, what happens whe...
Can I safely store a .Net compressed memory stream (System.IO.Compression) in an SQLServer 2005 NVARCHAR(MAX) field? SQLServer 2008 is not an alternative.
...
My warehouse datamart data is split across 3 databases on the same server. This is Proof-Of-Concept project with three extracts that were loaded into individual databases.
While pulling into a cube, I am essentially doing this:
SELECT * FROM DB1.dbo.Fact_Pres
UNION
SELECT * FROM DB2.dbo.Fact_Pres
UNION
SELECT * FROM DB3.dbo.Fact_Pres
...
as far as i know oracle has the "DATA VAULT" feature.so has sql server?if it has,give me an information link about that feature please.
* Preventing highly privileged users (DBA) from accessing application data
* Enforcing separation of duty
* Providing controls over who, when, where and how applications, data and databases can be acces...
I'm using using the sqljdbc4.jar (sqljdbc_2.0) version.
I'm executing an insert + a select back to get the identity like this:
BEGIN
INSERT INTO DateRangeOptions (Description,Code)
VALUES ('dateRange.quickPick.option.all','ALL');
SELECT SCOPE_IDENTITY()
END
and I get:
com.microsoft.sqlserver.jdbc.SQLServerException: The state...
I have a Sql Server 2005 database that contains many tables which are taking up a large amount of space (combined over 10 GB), and these tables have no rows in them. I can see the space and row count with right-click, properties (Data space and row count items).
Any ideas?
...
I'm reading the book Programming Collective Intelligence and trying to apply what I've learned against the Northwind database. Though I'm not yet confident in my understanding of the algorithms presented, I'm starting to get an idea of the general concepts.
Using the Northwind database, I'm attempting to show a list of "customers who b...
My limited SQL knowledge prompted this post!
I have a stored procedure that runs a series of updates.
There are 6 update statements, that could very well be mashed into one large update statement, but I dont know what that will mean for performance.
Table basics:
6 tables are hit. 3 of which will never have more than about 5000 rec...
Is there any way to get SQL Server result in charset different from the native database encoding?
I mean something like "set names" which is used by MySQL.
...
I am building a web application where users can enter events, including
event title
start date/time
description
The users would like to enter the start date/time including a timezone that corresponds with the location of the event. The events are worldwide so the timezone can change from event to event.
In the SQL Server backend dat...
Does anyone know whether SQLServer 2005 provide auto completion when typing stuff in??
I ve looked in the options many times but cannot find this option which is suprising as a lot of other sql editors do support this
...
Hi,
I have a single column table which looks like this:
Gaming | Austria | 47.9333, 15.1
Hebei | China | 39.8897, 115.275
This means that every row is a single string (VARCHAR) that contains some location, with the different fields separated by a pipe (|).
I would like to write a query that returns the following:
------- ----------...
I am interested in creating a heat map of the stock market using internal data, in much the same way as the following site: http://www.smartmoney.com/map-of-the-market/
We have all the data necessary to do so, as well as a C#/ASP.NET front end and a C#/SQL Server 2005 back end.
Can anyone recommend any resources for creating this type ...
I have a slow running query that I've been working on optimising.
When looking at the Client Statistics in Management Studio it was taking about 8 seconds wait time on server replies and about 1 second on Client processing time.
I have always thought that the Wait time on server replies was the number to work on and Client processing t...