Viewing 15 posts - 26,431 through 26,445 (of 26,487 total)
Yes you can. Only one of them can be installed as the default instance. The other has to be installed as a named instance.
hth
You have:
--if (@ogt_code = 'Golf Course' and @ret_value >1) --I added this to try to fix
--select...
August 8, 2006 at 7:37 pm
Shouldn't the select in the if statement look like this:
select @ret_value = @ret_vale + 1
I would prefer to use a set statement where you are using select to set @ret_value:
set...
August 8, 2006 at 2:48 pm
If you are looking at dynamic sql and accessing variable, look at using the extend stored procedure sp_executesql. You can find information about that procedure in BOL and I believe...
August 8, 2006 at 2:42 pm
Here is how I do it for one of our databases:
RESTORE DATABASE [H88TRN] -- Restore of full backup
FROM DISK = N'F:\sql_backups\H88PRD\H88PRD_20060804.bak'
WITH FILE = 1,
MOVE N'H88PRD_data' TO N'F:\sql_DBs\User_DBs\H88TRN\H88TRN_Data.mdf',
MOVE N'H88PRD_log' ...
August 8, 2006 at 2:34 pm
I have a default instance of SQL 2000 and a named instance of SQL 2005 on my box as well. I have no problem selecting the named instance of SQL...
July 24, 2006 at 12:19 pm
Another way:
select * into TableB from TableA where 1 = 2
Be sure TableB does not exist. Also this will not copy indexes, constraints, etc.
July 21, 2006 at 7:03 am
If it is running 6 minutes, you may still want to do some more work. I would suggest looking at your current indexes and perhaps running SQL Profiler to see...
July 20, 2006 at 9:07 am
Actually, I've used this to do some Test-Driven Development in SQL Server. It has all been manual at this time, but it's let me capture updates without destroying the underlying...
July 19, 2006 at 7:05 am
I stand corrected on stax68's code. My misperception was on where the criteria select was being completed. I have done some testing and I am posting those results here for...
July 18, 2006 at 6:52 pm
After wrestling with it some more, I have come up with a viable solution using a derived table and
a cross join. Please take a close look at the query to...
July 18, 2006 at 3:13 pm
I have made some updates to my test code:
set nocount on
create table dbo.SchoolAttendance(
AttendanceRuID int,
StudentID int,
AttendanceDate datetime,
AttendanceTyID int,
RollupCount int,
termID int null
)
create table dbo.SchoolAttendanceTy (
AttendanceTyID...
July 18, 2006 at 2:28 pm
Actually, not. In your code, you have hardcoded the student id.
your code:
select sat.AttendanceTyID
, sat.Description
, sar.AttendanceRuID
, 169 StudentID
, sar.AttendanceDate
, isnull(sar.RollupCount,0) RollupCount
from SchoolAttendanceTy sat
left join...
July 18, 2006 at 2:25 pm
Viewing 15 posts - 26,431 through 26,445 (of 26,487 total)