Viewing 15 posts - 14,626 through 14,640 (of 14,953 total)
;with LastRev (SN1, Rev) as
(select SN, max(RevisionNumber)
from dbo.table)
select UniqueID, SN, RevisionNumber
from dbo.table
inner join LastRev
on sn = sn1
and revisionnumber = rev
Try that.
March 5, 2008 at 11:45 am
paulhunter (3/4/2008)[hrThe only place I've found even a small issue is if it's the first column. Then the first style is easier. I rarely have only one column so,...
March 5, 2008 at 11:42 am
This is a double-post. There's another copy of the exact same question in the T-SQL 2k5 forum. More replies there.
March 4, 2008 at 3:09 pm
I'm not sure from the question, but I think the thing you are probably looking for is user defined functions.
If you find you are constantly having to do certain calculations...
March 4, 2008 at 3:07 pm
Try this:
;WITH
Ad_Keys1 (Ad_Key) as
(SELECT Ad_Key
FROM TBL_WORK_ORDER_DETAIL AS WODTL
INNER JOIN TBL_WORK_ORDER_HEADER AS WOHDR
ON WOHDR.WO_Hdr_Key=WODTL.WO_Hdr_Key
WHERE WODTL.TASK_SURR_KEY =1
AND WOHDR.WO_STATUS = 0
AND WOHDR.DELETED_FLAG =0),
Ad_Keys2 (Ad_Key) as
(select Ad_Key
FROM TBL_LOCATION_MASTER AS LM
INNER...
March 4, 2008 at 2:59 pm
Trader Sam (3/4/2008)
That view DDL does not reference the table DDL that was provided. Is this important?
I have to admit, I didn't even try to read that view and...
March 4, 2008 at 1:17 pm
I don't think this can be done in the Import/Export Wizard. SSIS can do it (of course), but you said you don't want to use that, so the only...
March 4, 2008 at 12:53 pm
You need to replace, "join dbo.CardActivationDetail transfer" in the second part of the CTE, with, "join Transfers transfer".
That should solve it.
March 4, 2008 at 12:40 pm
Take a look at this thread:
http://www.sqlservercentral.com/Forums/Topic445510-149-1.aspx
It's in reply to pretty much the same question.
March 4, 2008 at 12:29 pm
Add a full-text index to the description field, add a regular index to the other two fields in the Where clause, and take all the excess selects out of the...
March 4, 2008 at 12:24 pm
Steve Jones - Editor (3/3/2008)
I think you need a combination of solutions....
Amen on that! Definitely agree.
March 3, 2008 at 1:08 pm
I'm pretty sure there isn't a way to do that in a single recordset.
You might need to set up some conditional formatting in the reporting application. I know I...
March 3, 2008 at 11:45 am
Oh, and as an addition, on the subjects of (bio)-diesel and nuclear power, it is now possible to synthesize diesel fuel out of carbon dioxide and water vapor, using the...
March 3, 2008 at 11:39 am
tim_brimelow (3/2/2008)
March 3, 2008 at 11:34 am
Just did some tests.
The XML version is faster, significantly so, than the Numbers table version, for parsing out a string.
Has the added advantage of being able to take a multi-character...
March 3, 2008 at 11:17 am
Viewing 15 posts - 14,626 through 14,640 (of 14,953 total)