由买买提看人间百态

topics

全部话题 - 话题: ntile
(共0页)
k**g
发帖数: 1558
1
来自主题: Database版 - 有包子!sql 怎么不rank Null
试过下面的,不行。第一个非Null的数据Ntile就是6,我一共有10000+数据
select *,
(CASE WHEN PB IS NOT NULL THEN NTILE(100) OVER(ORDER BY PB ASC) ELSE NULL
END) AS Rnk_PB6
into #temp6
from #temp5
R*o
发帖数: 3781
2
来自主题: TrustInJesus版 - Study and Exposition of Romans 1:1-7
1:1 Paul refers to himself by his Latin (Roman citizen) name Paul (perhaps h
is cognomen), rather than his Jewish name, Saul—a change which is recorded
in Acts 13:9, 13.17 What is most amazing about Paul the author or Romans is
not that he didn’t have the rhetorical skill or intellectual prowess to wri
te well, but that justification by faith through grace should be the subject
discoursed upon by this one time persecutor of the church, legalist, and Ch
rist hater. Paul, the converted Pharisee, w... 阅读全帖
R*o
发帖数: 3781
3
来自主题: TrustInJesus版 - Study and Exposition of Romans 1:1-7
1:1 Paul refers to himself by his Latin (Roman citizen) name Paul (perhaps h
is cognomen), rather than his Jewish name, Saul—a change which is recorded
in Acts 13:9, 13.17 What is most amazing about Paul the author or Romans is
not that he didn’t have the rhetorical skill or intellectual prowess to wri
te well, but that justification by faith through grace should be the subject
discoursed upon by this one time persecutor of the church, legalist, and Ch
rist hater. Paul, the converted Pharisee, w... 阅读全帖
R*o
发帖数: 3781
4
来自主题: TrustInJesus版 - Study and Exposition of Romans 1:18-32
E. Exposition Proper
The section 1:18-32 is part of the larger section of material in 1:18-3:20 (
cf. the teaching outline at the front of the book). The function of this mat
erial, as the for in 1:18 indicates, is to confirm that faith alone is the o
nly means of attaining the righteousness offered in the gospel in 1:17.
This is so because all men are depraved and cannot earn God’s salvation by
their own works or merit. The point of 1:18-32 is to show that the Gentiles
(primarily, though not ex... 阅读全帖
R*o
发帖数: 3781
5
来自主题: TrustInJesus版 - Study and Exposition of Romans 1:18-32
E. Exposition Proper
The section 1:18-32 is part of the larger section of material in 1:18-3:20 (
cf. the teaching outline at the front of the book). The function of this mat
erial, as the for in 1:18 indicates, is to confirm that faith alone is the o
nly means of attaining the righteousness offered in the gospel in 1:17.
This is so because all men are depraved and cannot earn God’s salvation by
their own works or merit. The point of 1:18-32 is to show that the Gentiles
(primarily, though not ex... 阅读全帖
R*o
发帖数: 3781
6
来自主题: TrustInJesus版 - Study and Exposition of Romans 2:1-16
2:7-11 In vv. 7-8 Paul shows how the principle of God’s judgment finds its
way among two classes of people. God will give eternal life (zwhVn aijwvnion
, zoen aionion) to those who by perseverance in good works (e[rgou, ergou) s
eek glory, honor, and immortality. To those, on the other hand, who are char
acterized as having selfish ambition (ejriqeiva", eritheias), that is, who d
o not obey the truth (ajpeiqou’si th’/ ajlhqeiva/, apeithousi te alhtheia)
but follow unrighteousness (peiqomevnoi" d... 阅读全帖
R*o
发帖数: 3781
7
by Dave Hunt
Not A Question Of Obligation
Such rationalization simply won't work. Of course Calvinism's God prevents t
he non-elect from coming to Him. He very clearly does so by withholding the
grace without which they can't believe.
Furthermore, He has predestined them to eternal damnation. Could there be an
y stronger means of preventing the nonelect from coming to Him? What this fr
iend apparently means is that God withholds nothing that He is under obligat
ion to bestow.
Obviously God is un... 阅读全帖
k**g
发帖数: 1558
8
建立一个自己的procedure用来rank不同table里面的数据
Create Procedure ASCRanking
@variable varchar(20),
@Rnk_variable varchar(20),
@tablename varchar(50),
@numberofcategory varchar(5),
@Partition varchar(50)
As
Declare @sql1 varchar(200)
Declare @sql2 varchar(200)
BEGIN
set @sql1='Alter Table '+@tablename+'Add '+@Rnk_variable+' real'
EXEC(@sql1)
--set @sql2='Update '+@tablename+
--' Set '+@Rnk_variable+'=NTILE('+@numberofcategory+') OVER(PARTITION BY '+@
Partition+' ORDER BY '+@variable+' ASC)'
--EXEC(@sql2)
END
... 阅读全帖
k**g
发帖数: 1558
9
我用了这个例子,结果rank一个variable,花了33分钟。如果我用以下的只要花10秒,
问题是我有90个variable,如果用以下的然后再join 90个temp table,也要花很长时间
。有什么省时间的方法啊?
select *,
NTILE(100) OVER(PARTITION BY Date,Region ORDER BY PB ASC) AS Rnk_PB2
into #Temp2
From #temp1
z**********8
发帖数: 2049
10
来自主题: Database版 - MATCH,MATCH,MATCH
今天,老板把我降为DATA ENTRY了.:(
2,700-3000左右的长长的DATA RECORDS,需要一个一个鉴别,然后MATCH.因为我们在
TRANSITION当中, 很多PERMISSION暂时冻结.哭死.-期限5天
本来想展示我拿手的, PIVOT TABLE, CTE, 或者NTILE FUNCTION技艺,一下子被打入到
地上.DATA ENTRY!
h****r
发帖数: 258
11
来自主题: Programming版 - 这个函数调用是不是很反人类?
最近在看的一段Fortran代码
call CATCHMENT ( NTILES ,&
DT , PRECIPFRAC, cat_id, VEG, DZSF ,&
PCU , PLS , SNO ,&
UUU ,&
EVSBT(:,FSAT), DEVSBT(:,FSAT), TILEZERO ,&
SHSBT(:,FSAT), TILEZERO , DSHSBT(:,FSAT),&
EVSBT(:,FTRN), DEVSBT(:,FTRN), TILEZERO ,&
... 阅读全帖
h****r
发帖数: 258
12
来自主题: Programming版 - 这个函数调用是不是很反人类?
最近在看的一段Fortran代码
call CATCHMENT ( NTILES ,&
DT , PRECIPFRAC, cat_id, VEG, DZSF ,&
PCU , PLS , SNO ,&
UUU ,&
EVSBT(:,FSAT), DEVSBT(:,FSAT), TILEZERO ,&
SHSBT(:,FSAT), TILEZERO , DSHSBT(:,FSAT),&
EVSBT(:,FTRN), DEVSBT(:,FTRN), TILEZERO ,&
... 阅读全帖
B*****g
发帖数: 34098
(共0页)