Hi
am getting following error while setup Microsoft SQL Server 2005.why can you please anybody tell me? Thanks in advance
Microsoft SQL Server 2005 Setup
SQL Server 2005 Setup cannot continue because the installation package could not be opened. The installation package has a missing file, or you are running a 32-bit only Setup progra...
I have a rather large set of integration tests developed in C#/NUnit. Currently it is one test fixture, one class. In [TestFixtureSetUp] I create a database from a script and populate it with test data, also from a script. My tests do not modify data, so they can run in any order or in parallel.
My problem is that I have too many tests...
Hallo All,
Please help in determining the best procedure for the following problem.
In a user interface, there is a provision to upload excel file. This is done by admin, once/twice in a day on a regular basis.
The code that i have used to upload excel file into sql server.
select *
into #temp FROM OPENROWSET('Microsoft.Jet.OLEDB.4....
I am creating some reports for an application to be used by various states. The database has the potential to be very large. I would like to know which way is the best way to get column totals.
Currently I have SQL similar to the following:
SELECT count(case when prg.prefix_id = 1 then iss.id end) +
count(case when prg.prefix_...
Dear All, I have another issue. I have in the SQL table Employees. This table has lot of details but I was missing images or photos.
So i managed to take all pictures for all employees but I have the pictures in the folder. Each picture is named like an Employee_id which matches the record in the table. How do I import images into SQL ...
Below is a sample query of what I am trying to do and it gets the job done but I feel like the sub queries are not the best way to go here. Any pointers?
SELECT DISTINCT
u.UserID,
(SELECT COUNT(LoginID) FROM Logins WHERE Success = 1 AND UserID = u.UserID) AS Successful,
(SELECT COUNT(LoginID) FROM Logins WHERE Success = ...
I am getting different result set for these two queries and second result set seems to be correct. What is the difference in these queries.
What type of inner join query second is?
1)
FROM TABLE1 t1
INNER JOIN TABLE2 t2 ON t1.Id = t2.Id
WHERE
t1.StatusId = 12
2)
FROM TABLE1 t1
INNER JOIN TABLE2 t2 ON t1.Id = t2.Id
AND t1.Sta...
How can you tell what Tables are taking up the most space in a SQL Server 2005 Database?
I am sure there is some System Stored Procedure that shows this information.
I have a TEST database that grew from 1tb to 23tb. We are currently doing a lot of client conversion testing in the database, which entails running the same conversion S...
Hi everyone,
I have a SQL statement I'd like to amend. As it stands now I'm running a simple SELECT INTO but I'd like to modify it so only records that don't exist in the destination table (as determined by my criteria) are appended.
Here's my initial statement:
SELECT b.BallotID, m.MeetingDate
INTO StagingTable
FROM Ballot I...
I'm SO close, but so far.
I've got two tables, one for publication details, the other for the categories adjacency list.
I'm trying to display the full dataset with nested repeaters (unless there's a better way)
and I'm building my DataSet as shown:
string strSql = "SELECT category_id, parent_id, cat_name_en " +
"FROM c...
I have the following snippet:
CONVERT(varchar, FLOOR(ROUND((DATEDIFF(minute, shiftStart.timeEntered, shiftEnd.timeEntered) - DATEDIFF(minute,
lunchStart.timeEntered, lunchEnd.timeEntered)) * 1.0 / 60, 2, 1))) + ':' + CONVERT(varchar, ROUND(ROUND(DATEDIFF(minute, shiftStart.timeEntered,
shif...
I'm about to implement this function to calculate some numbers.
CREATE FUNCTION [dbo].[funLookupFTE] (@PFID int) RETURNS
VARCHAR(20) AS BEGIN
DECLARE @NumberOfFTE AS VARCHAR(20)
SET @NumberOfFTE = (SELECT SUM(CASE WHEN Hours <= 20 THEN 0.5 WHEN Hours > 20 THEN 1 END) AS FTECount
FROM tblPractitioners
...
I am using SQL Server 2005. I would like to update fields like Order BY MatchId orders as below query. But updeted fields not order by MatchId.
DECLARE @counter int
SET @counter = 10008
UPDATE Matches
SET @counter = MatchNumberCounter = @counter + 1
WHERE MatchId IN
(SELECT TOP (232) MatchId FROM Matches WHERE LeagueStatueId =...
Hi guys,
I've gotta question for you, I'm getting hard times trying to combine two tables, I can't manage to find the correct query.
I have two tables:
T1: 1column, Has X records
T2: 1column, Has Y records
Note: Y could never be greater than X but it often lesser than this one
I want to join those tables in order to have a table with t...
I am using sql server 2005. In this query i want the log-in user detail should also display but it is not displaying .
So please modify the query so that log-in user detail should also display with the help of session[userId].tostring();
Query written by me is:
SELECT DISTINCT MUDMEMBER.PK_ID, MUDMEMBER.EMPLOYEE_ID, LKB.BANK_NAME, MUH...
I have a date, suppose today date
declare @d datetime
set @d = '20101014'
I need
select @d - <six month>
where is the real number of days that contains last six month, beginning from @d.
...
I am facing a problem for writing an sql query which should be easy I guess but I am not able to concentrate on that query. Hence taking some help from this website.
Problem: I have an table "Request" which has following columns -
CreatedOn: When I create new request, the CreatedOn is filled up with current datetime
LastModifiedOn: Wh...
Hi,
I've been trying to solve a slow trigger problem and now that I have through trial and error, I still don't know what the original problem was.
The query I'm running is the following:
UPDATE tblA
SET X = NULL
WHERE X IS NOT NULL AND Z = 0
It updates around 30k rows.
And the part of the AFTER INSERT, UPDATE trigger on tblA caus...
My table has 3 columns:
RecordId
Value
InsertDate
Each RecordId has multiple entries in the table. In fact the table gets updated several times a day.
How do I write a t-sql query to select all the latest rows (based on InsertDate) for each unique record?
My t-sql skills are non-existent.
Thanks in advance
...
I am getting an error on our Maintenance plan in sql server 2005 saying that the Setp1 of job cannot be run because the SSIS subsystem failted to load. The job has been suspended. How can I fix this and unsuspend the job so that I can run the plan?
...