Viewing 15 posts - 1,486 through 1,500 (of 2,171 total)
Family yes, but employee?
You were originally talking about employees. How to tell which employer John Smith has?
July 19, 2007 at 1:48 pm
Yes. TINYINT.
All datatypes available are found in Books Online.
July 19, 2007 at 3:59 am
Yes, now we know of which kind of dependancy they have. BUt how to know to which record John Smith is spouse of Jane Smith?
July 18, 2007 at 11:33 pm
Sample data and expected output would be great!
July 18, 2007 at 12:38 pm
Or
SELECT PkCol, Min(Col), Max(Col)
FROM (
SELECT PkCol, Col1 AS Col FROM Table1 UNION ALL
SELECT PkCol, Col2 FROM Table1 UNION ALL
SELECT PkCol, Col3 FROM Table1
) AS d
GROUP BY PkCol
July 18, 2007 at 12:12 pm
Michaels solution is slightly better in the average part and standard deviation part.
Mine is better in the min and max part.
A_Min A_Max A_Avg A_stdev B_Min B_Max B_Avg B_stdev
0.9500000628500 1.0499998679000 0.9999792216210 0.0288983278667 0.9500000000000 1.0500000000000 0.9999620000000 0.0302697208647
July 18, 2007 at 11:04 am
Only if you post actual data from your table, and the code used for your function.
July 17, 2007 at 11:09 am
Oleg, I do not know which is right. I just posted the both approaches for comparison.
The only one qualified to determine the right approach is original poster.
July 17, 2007 at 7:22 am
data OlegS Peso
-------------- -------------- --------------
00 00
00000000000000 0000000000000
00000000000002 2 2
00000000000100 100 100
00000000002100 2100 2100
000000000A4504 A4504 A4504
July 17, 2007 at 6:32 am
It will work if there is a clustered index on RankOrder column.
Or
UPDATE t1
SET t1.RankOrder = (SELECT COUNT(*) FROM Table1 AS t2 WHERE t2.RankOrder >= t1.RankOrder) -- If not working, try...
July 17, 2007 at 6:26 am
It will work when you add a clustered index over serialnumber.
July 17, 2007 at 5:50 am
something like this. it is readable in Books Online.
TRIGGER for UPDATE
IF COLUMN(col4)
BEGIN
END
July 17, 2007 at 3:00 am
Sergyi, will you do me the favor of revising the algorithm I posted here
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=381713
It might have a bug I haven't spotted yet. If you find any, I would be...
July 16, 2007 at 11:44 pm
Viewing 15 posts - 1,486 through 1,500 (of 2,171 total)