If I store all my dates in SQL Server 2005 as GetUtcDate() what is the best way to search on these date fields. I'm using C# so should i convert the date submitted by the user to UTC using C# (passing to Stored Proc) to search my dates in SQL?
Also, since i'm using UTC do I need to worry about day light savings? When I want to display ...
I have a client that has a SQL Server 2008 installation. They have given me a windows domain username/password on their domain, however, my workstation is not on their domain. I'm trying to connect with Management Studio on Vista Professional.
I've tried using the "network accounts" under "user accounts", and this works for other reso...
I am getting a sqlserver Timeout in my aspx page.
It comes when i click one of the link in the website.
Will indexing will help with this problem?
Thanks
...
What do I need to change in Sql Server to be able to store values like "2,1" in a decimal field? Right now I have to have dots like "2.1".
I have Finnish_Swedish_CI_AS collation on the database but that doesn't seem to be it ... I also fiddled around with the regions settings on the server but with no success. I know I've managed to ch...
Dear All,
How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8
...
asp.net and sql server, have sqls for selecting a subset of rows, I need the count* frequently
Of course I can have a select count(*) for each of these sqls in each roundtrip but soon it will become too slow.
-How do you make it really fast?
...
Is there any built in way to read a file with SSIS and after reading it clearing the file of all content?
...
If I pass in an xml parameter to a stored proc which looks like this:
<ClientKeys>
<ck>3052</ck>
<ck>3051</ck>
<ck>3050</ck>
<ck>3049</ck>
...
</ClientKeys>
...and then convert the XML to a temp table like this:
CREATE TABLE #ClientKeys ( ClientKey varchar(36) )
INSERT INTO #ClientKeys (ClientKey)
SELECT Param...
As I found this can be done with merge replication in SQL Server. But I have only one main server and many small ones(with Express edition installed on them).
Let me explain:
There is the main (big) office with SQL Server Standard edition installed on its server. And there are many offices across the country with with their own small ...
How do I set the the default encoding of my local file SQL-Server database?
Thanks.
EDIT: Removed the UTF-8
...
If I have a decimal like 32.593170731707329023999999999 - what SQL Datatype, and precision and scale should I use?
My integer parts are pretty small (1-10000) and fraction part big.
Have tried decimal with different variations of precision and scale, but get an overflow exception in .Net.
...
I'm trying to write a vb.net application that uses an sql dependancy.
The dependancy will be triggered when data is added to the database.
I'm wondering if it's possible to have the dependancy return the data/query that triggered it.
currently i have to have the onchange event trigger a select statement to refresh the data i have cach...
Is it possible to display all but first row from a table in sql server 2005?
I have this data:
---------------------------------
| ID | Name |
---------------------------------
| 1 | John Smith |
| 2 | John Doe |
| 3 | John Thatcher |
---------------------------------
In ...
Hi,
I have a SQL Query with a join between several tables.
When I run this query it takes 1min 12 however if I add a Coalesce around the accountID I get a massive performace benefit and it runs in 12 minutes. See the full unedited query below.
SELECT dbo.CaptionMapItem.CaptionMapItemID,
dbo.CaptionMapItem.NodeText,
...
I am moving data from a MSSQL database to a MySQL database. I need to connect with PHP to MSSQL and then insert into MySQL. Could someone tell me how to:
See if the mssql server is running remotely,
How to connect to it?
Code:
mssql_connect($host,$user,$pass) or die('Failed Server Connect! ' . mssql_get_last_message());
mssql_selec...
Is it possible to change the default templates in SQL Server Management Studio? For example, when I right-click on a table and I choose "Script Table as" from the context menu, I can choose select, insert, update, etc. I would like to change the format of some of these sql scripts like you can with the templates in the template explorer....
I created a proc that will return a list of applicants by lastname. I have a problem searching Applicants with last name that has apostrophe (Example O'Connor). Could you please help finding those applicants:
Below is my Search Code:
if Rtrim(@FirstName) <> ''
begin
If(Len(@FirstName) < 30) and (CharIndex('%', @FirstName) = 0) and @...
Is it possible to run multiple stored procedures that run 'in the background'?
The stored procedures must be launched from a single, master stored procedure, in the same way that multiple worker threads are spawned. For example:
CREATE PROCEDURE MyLauncher
AS
BEGIN
BEGIN
@EXEC MyBackgroundSP01 -- Runs in parallel to the othe...
I have a long SQL query, it does some inserts, updates, then deletes. Each query uses the same 2 parameters. If I pass them in as SQL parameters from C#, it times out, after 20 mins. I just put the parameters into the command text, and it works. When I use it with the parameters it doesn't even show up in the profiler till it times out. ...
I get that the (nolock) optimizer hint allows for "dirty reads", but under what very specific scenarios is this a bad idea? I've never seen such widespread use of (nolock) in an organization, and it makes me nervous. I'd like an explanation in terms of user stories. "Paul does A, Peter does B, X happens instead of Y".
...