Skip to content

Commit 7637bd0

Browse files
authored
Add ROUND length param to BFS function
1 parent 51986a2 commit 7637bd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mssql/ddl/func-bfs-weight.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ BEGIN
4848
UNION ALL
4949

5050
SELECT n.personId, d.OrderDiscovered,
51-
CAST(cte.Path + ';' + CAST(n.personId as varchar(MAX)) as varchar(MAX)), cte.score + CAST(ROUND(40 - SQRT(d.weight)) AS bigint)
51+
CAST(cte.Path + ';' + CAST(n.personId as varchar(MAX)) as varchar(MAX)), cte.score + CAST(ROUND(40 - SQRT(d.weight),0) AS bigint)
5252
FROM #Discovered d JOIN BacktraceCTE cte ON d.Predecessor = cte.Id
5353
JOIN dbo.Person n ON d.Id = n.personId
5454
)

0 commit comments

Comments
 (0)