Selecting between two dates within a DateTime field - SQL Server
How to select records between a date to another date given a DateTime field in a table.... ...
How to select records between a date to another date given a DateTime field in a table.... ...
We run SQL Server 2005 exclusively for databases that we use (I'm trying to push to get them upgraded, but alas!). On the client side with Management Studio, are there any benefits to upgrading to SSMS2008 when only connecting to SQL Server 2005 databases? I've seen that Intellisense won't work, so I'm curious if it's worth the hassle. ...
I'm looking at the Activity Monitor in SQL Server 2005 and when I double click a specific process to view the SQL I am given a blank screen. What does this mean? What could be causing this? ...
We currently have merge replication set up to merge certain tables between two databases. I need to programmatically start one of the publications to make sure data has been synchronized prior to starting a certain job. SQL Server Books Online has not been too helpful. So far, the only thing I have come up with is to use sp_start_job ...
I am looking at the Activty Monitor for SQL Server 2005 and we have some processes that are taking up large amounts of the CPU. When I look at what is trying to be run I get: set transaction isolation level read committed This code is not coming from any of our applications. What is causing it? What should be done? ...
how can i select 12/20/2008 in where clause of sql. it is sql server 2005. select * from tblErrorLog where errorDate = '12/20/2008' ...
I am getting the following ODBC exception when I moved my development platform from Windows XP X86 to Windows 7 X64: ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application What I'm sure it means is that the server it is connecting to is 32 bit, and the comp...
I have the following SQL query.... select AanID as '@name', '<![CDATA[' + Answer + ']]>' from AuditAnswers for XML PATH('str'), ROOT('root') which works wonderfully but the column 'Answer' can sometimes have HTML markup in it. The query automatically escapes this HTML from the 'Answer' column in the generated XML. I don't want that....
Hi I have a table with following columns and data FldID | Rev | Words 10257 2 Some text is present here 10257 3 I changed this text 10258 2 Some more text for another item 10258 3 ...
I designed 5 stored procedures which almost use same join condition but parameters or values in where clause change for each on different runs. Is it best solution to create a view with all join conditions without where clause and then query from view or work on view? Can views auto update itself if i create view? Can i do sub-queries o...
Possible Duplicate: Activity Monitor Problems in SQL Server 2005 I have some processes running on my database server that are taking up enourmous amount of CPU. When I view the detail about the process I get: set transaction isolation level read committed The other details include: Status: Sleeping Open Transactions: 0 Com...
Every SQL Server connection string I ever see looks something like this: Data Source=MyLocalSqlServerInstance;Initial Catalog=My Nifty Database; Integrated Security=SSPI; Do I need the Initial Catalog setting? (Apparently not, since the app I'm working on appears to work without it.) Well, then, what's it for? ...
Just got a win 2003 (64-bit) server box with 6 x 320 GB disks and intending to install mssql 2005 (64-bit standard). Thinking of setting up the following: Disk 1 & 2 run Raid 1, split into C:\ for OS (~50GB) and D:\ for all .ldf files (~250GB) Disk 3 to 6 run Raid 0, split into E:\ for .mdf files (~700GB) and F:\ for running backups et...
CREATE TABLE exmp_test ( id int, v1 int, v2 int, v3 int, v4 int ) SELECT * FROM exmp_test id v1 v2 v3 v4 1 2 4 6 7 1 4 77 3 8 I want to add the value of the [id] column to (whichever has least value for v1 ,v2 ,v3 ,v4) for each row. As an example, for the first row, the [id] value should be add to v1 (because it ...
HI There, what are the possible ways in which i can maintain relationships across instances of databases . i know relationships across DB's is bad approach , but i have to do this way. i am using SQL SERVER 2005. Thanks DEE ...
What I have found on the 'net seems a little ambiguous whether or not something needs to be installed on the server to use the Sync Framework with SQL Server 2005. My interpretation is no, that the ADO.NET'ness of the product reaches out to the server (assuming appropriately trackable tables exist). My goal is to use SQL Compact on the...
I have seen a number of different cftransaction examples and read different sites and still have not been able to find a definitive answer to what parts of cftransaction are necessary. What I am trying to accomplish is very simple: start a transaction run multiple inserts/updates close the transaction If there is an error at any time...
I was just playing with adventureworks database in sqlserver. I got stuck in a query. I wanted to Select all titles from HumanResources.Employee which are either 'Male' or 'Female' but not both. i.e if title Accountant is Male and Female both I want to leave that title. I need only those titles where Gender is either Male or Female. I h...
I'm looking for a way to handle the following scenario. I have a database table that I need to return only one record for each "group id" that is contained within the table, furthermore the record that is selected within each group should be the oldest person in the household. ID Group ID Name Age 1 134 John B...
Hello friends. I am working on a project in ASP.Net, and I am using SQL Server 2005. My problem is something like that: I have two Tables. Table A : Which has fields ID and Category (ID is primary Key) Table B : Which has fields ID, CategoryID, Item There is a relation A:ID ----> B.CaregoryID Lets Add some records. Table A: ID ...