Viewing 15 posts - 481 through 495 (of 5,504 total)
I would also avoid the four round trips to tblAdContactInfo:
;
WITH cte AS
(
SELECT [Value],ContactTypeId
FROM tblAdContactInfo
WHERE AdInfoId=@AdInfoId AND ContactTypeId IN (5,6,7,8)
)
Select
@Building= MAX(CASE WHEN ContactTypeId = 5 THEN [Value] ELSE NULL...
March 26, 2012 at 2:52 pm
Given the table structure you posted there's no way to find the rows that should match.
Let's assume there are four rows, all having the same values for Server,LogDate,ProcessInfo.
How would you...
March 26, 2012 at 2:18 pm
Without knowing the table structure it's hard to tell what needs to be changee in the code snippet I provided.
I'm sure it can be modified to meet your criteria.
March 26, 2012 at 2:05 pm
Theory first:
In a table, there is no natural "above" or "below". It all depends on the ORDER BY criteria.
Ok, end of theory. Unfortunately, the wErrorLog table in the link you...
March 26, 2012 at 1:43 pm
The examples you mentioned usually refer to data transfer or database recovery.
Data migration usually involves two different systems (e.g. two different SQL server versions or to migrate from Oracle to...
March 25, 2012 at 1:37 pm
It's a rather vague description o what you're trying to do. So the answer will be vague, too:
You could use the OUTPUT clause together with the first statement to capture...
March 22, 2012 at 3:29 pm
Here are some resources for cte:
BooksOnLine and a article[/url] here at SSC.
and ROW_NUMBER
BooksOnLine and a related article
March 20, 2012 at 4:12 pm
I'm not sure if my approach is waht you're lloking for, but I think the ROW_NUMBER approach will help here:
;
WITH cte AS
(
SELECT
Student_ID,
Exam_ID,
Admission_Exam_Code,
Admission_Exam,
Admission_Exam_Type,
Admission_Exam_Date,
Admission_Exam_Score,
ROW_NUMBER() OVER(PARTITION BY Student_ID,Exam_ID ORDER BY Admission_Exam_Date desc...
March 20, 2012 at 1:59 pm
To expand on what Gail already recommended:
Even though there might be objects that never show up you'll need to investigate the purpose of each of those objects. Some might be...
March 18, 2012 at 6:28 am
Is this still the same issue as the one you posted a few days ago?
March 17, 2012 at 2:50 pm
Something like this?
SELECT
t1.col_1 AS col_1a,
t2.col_1 AS col_1b
FROM SourceTbl t1
INNER JOIN SourceTbl t2
ON t1.col_2=t2.col_2
AND t1.col_3=t2.col_3
AND t1.col_1<>t2.col_1
March 17, 2012 at 12:30 pm
Are you looking for something like the following code snippet?
I decided to use a solution that is based on a given @Fname parameter.
I would wrap this code in a separate...
March 17, 2012 at 8:15 am
GabyYYZ (3/15/2012)
...My boss, whose background is SAP and Oracle, loves asking the referential integrity questions,...
I'm just wondering if he's interested in learning this stuff since he's been missing it...
March 15, 2012 at 1:27 pm
Why not create the xml structure without the namespace reference, but with the nil element and replace < sourcename > with < sourcename xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > and nil="true" with "xsi:nil="true" ?
Edit:...
March 14, 2012 at 2:07 pm
Viewing 15 posts - 481 through 495 (of 5,504 total)