create account

RE: 请MSSQL高手指点一下JSON的问题 by ace108

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @oflyhigh/mssql-json

· @ace108 · (edited)
$8.37
我是用这样分开。
...
<pre><code>
JSON_VALUE(cm.json_metadata,'$.tags[0]') tag1,
JSON_VALUE(cm.json_metadata,'$.tags[1]') tag2,
JSON_VALUE(cm.json_metadata,'$.tags[2]') tag3,
JSON_VALUE(cm.json_metadata,'$.tags[3]') tag4,
JSON_VALUE(cm.json_metadata,'$.tags[4]') tag5
from Comments cm WITH (NOLOCK)
where ...
</code></pre>
也是不久前上网找到的。
👍  , , ,
properties (23)
authorace108
permlinkre-oflyhigh-mssql-json-20170815t151926237z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-15 15:19:27
last_update2017-08-15 15:20:12
depth1
children3
last_payout2017-08-22 15:19:27
cashout_time1969-12-31 23:59:59
total_payout_value6.277 HBD
curator_payout_value2.090 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length325
author_reputation1,244,856,666,250,146
root_title请MSSQL高手指点一下JSON的问题
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,888,872
net_rshares2,436,474,317,012
author_curate_reward""
vote details (4)
@ace108 · (edited)
$0.72
就好象我用于中日韩报告这样 [📊🌏中日韩龙虎榜自20170811 | CJK Top Pending Payout Post since 20170811 (by @ace108)](https://steemit.com/steemit-stats/@ace108/20170812-or-cjk-top-pending-payout-post-since-20170812-by-ace108)
补充...
<pre><code>
where
    ( ( JSON_VALUE(cm.json_metadata,'$.tags[4]') in ('cn','china') ) or   
      ( JSON_VALUE(cm.json_metadata,'$.tags[3]') in ('cn','china') ) or   
      ( JSON_VALUE(cm.json_metadata,'$.tags[2]') in ('cn','china') ) or   
      ( JSON_VALUE(cm.json_metadata,'$.tags[1]') in ('cn','china') ) or   
      ( JSON_VALUE(cm.json_metadata,'$.tags[0]') in ('cn','china') ) or   
</code></pre>
👍  ,
properties (23)
authorace108
permlinkre-ace108-re-oflyhigh-mssql-json-20170815t152438952z
categorycn
json_metadata{"tags":["cn"],"links":["https://steemit.com/steemit-stats/@ace108/20170812-or-cjk-top-pending-payout-post-since-20170812-by-ace108"],"app":"steemit/0.1"}
created2017-08-15 15:24:39
last_update2017-08-15 15:26:54
depth2
children0
last_payout2017-08-22 15:24:39
cashout_time1969-12-31 23:59:59
total_payout_value0.542 HBD
curator_payout_value0.181 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length612
author_reputation1,244,856,666,250,146
root_title请MSSQL高手指点一下JSON的问题
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,889,323
net_rshares211,016,453,087
author_curate_reward""
vote details (2)
@oflyhigh ·
$0.08
感谢分享,这个我有考虑过
对steemit而言也算是个好办法,毕竟标签数目不超过五个

你这连实现例子都给了
大大的👍
👍  
properties (23)
authoroflyhigh
permlinkre-ace108-re-oflyhigh-mssql-json-20170815t160104411z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-15 16:01:06
last_update2017-08-15 16:01:06
depth2
children1
last_payout2017-08-22 16:01:06
cashout_time1969-12-31 23:59:59
total_payout_value0.060 HBD
curator_payout_value0.019 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length59
author_reputation6,480,446,559,984,510
root_title请MSSQL高手指点一下JSON的问题
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,892,698
net_rshares23,503,781,683
author_curate_reward""
vote details (1)
@ace108 ·
不客气。谢谢你的👍
👍  
properties (23)
authorace108
permlinkre-oflyhigh-re-ace108-re-oflyhigh-mssql-json-20170815t231851722z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-15 23:18:57
last_update2017-08-15 23:18:57
depth3
children0
last_payout2017-08-22 23:18:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length9
author_reputation1,244,856,666,250,146
root_title请MSSQL高手指点一下JSON的问题
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id11,926,079
net_rshares0
author_curate_reward""
vote details (1)