Viewing 15 posts - 166 through 180 (of 240 total)
What value do you expect @Count to have if this was to work?
SELECT @Count = COUNT(DISTINCT Number)
FROM #First
UNION
SELECT @Count = COUNT(DISTINCT Number)
FROM #Second
Given your sample, if you expect 4 then:
SELECT...
February 22, 2006 at 2:11 pm
I actually find that using a LEFT OUTER JOIN performs better than a NOT EXISTS. The syntax that I normally use to insert new records that don't already exist is:
February 22, 2006 at 1:39 pm
Try something like this:
Select top 5
A.ApplicationId,
A.Id as ExamId,
DateOfExam,
B.DateStartEffectiveEligibility,
IsNULL(Failure.LatestFailure, B.DateStartEffectiveEligibility) as DateEffectiveFailed
APIExamSequence,
AppCount.NumOfApps
From CW_Exams A
Inner Join CW_Applications B on A.ApplicationId = B.Id And B.DateStartEffectiveEligibility > '2004-12-31' And
DateOfExam is not...
February 22, 2006 at 1:31 pm
What is the table definition of the destination?
If the VFROM is a timestamp column, then this a not a date and can not be imported.
February 22, 2006 at 1:04 pm
If I was trying to learn the system at the database level with the intent of making changes to the tables, I would look at an ER diagram and see...
February 21, 2006 at 1:53 pm
Try something like this:
declare @Contract table (ContractID int, ContractName varchar(255))
insert @Contract values (1, 'NCLA Galley')
insert @Contract values (2, 'NCLA Galley')
insert @Contract values (3, 'Some Other Contract')
declare @Person table (PersonID int,...
February 21, 2006 at 1:13 pm
this creates a temporary table #a:
select name
into #a
from sysobjects
select * from #a
February 21, 2006 at 12:55 pm
For case sensitivity try:
declare @Word table (Word varchar(255))
declare @String varchar(255)
select @String = 'This part is a ROHS Compliant widget.'
insert @Word values ('Lead Free')
insert @Word values ('Rohs Compliant')
insert @Word values ('Rohs')
select...
February 21, 2006 at 12:51 pm
declare @Word table (Word varchar(255))
declare @String varchar(255)
select @String = 'This part is a ROHS Compliant widget.'
insert @Word values ('Lead Free')
insert @Word values ('Rohs Compliant')
insert @Word values ('Rohs')
select @String = replace(@String,...
February 21, 2006 at 12:39 pm
SQL Server 2000 follows the ANSI SQL standards when comparing strings of different lengths, the shorter string is padded with blanks and then compared. So SQL Server 2000 is...
February 21, 2006 at 10:50 am
Why does it matter in any environment? If I "Select CustomerName, City From Customer Where CustomerID = 1", when does it matter what the implementation of Customer is? Do I care...
February 21, 2006 at 10:24 am
Does it matter when selecting data from it? I does matter when doing inserts but the advantages of the ability to refactor parts of the database and not affect existing...
February 21, 2006 at 9:42 am
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
SET ANSI_WARNINGS ON
GO
CREATE PROCEDURE A
as
...
GO
February 21, 2006 at 7:47 am
I don't need the sp_addlinkedsrvlogin for this to work for me. Changes are highlighted:
c:\temp.txt
aaaaaaaaaa
bbbbbbbb
ccccccccc
dddddddddddddddddd
eeeeeeeeeeeee
ffffffffffffffffff
gggggggggggg
c:\schema.ini
[temp.txt]
ColNameHeader=False
Format=FixedLength
MaxScanRows=25
CharacterSet=OEM
Col1=columnname Text
SQL Script
--Create a linked server
EXEC sp_addlinkedserver txtsrv, 'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'c:\',
NULL,
'Text'
GO
--Query one of the...
February 17, 2006 at 3:45 pm
Viewing 15 posts - 166 through 180 (of 240 total)