【问题标题】:looking for records with specific property values查找具有特定属性值的记录
【发布时间】:2020-10-21 05:58:42
【问题描述】:

我正在尝试向此查询添加一项功能,该功能允许我显示或搜索下面列出的扩展数据列中包含的属性。该属性是“custom:institutionid”。

我必须在此查询中添加什么才能在此属性中搜索特定字符串。该字符串是“ottawa2”。

select cm.course_id, encode(cc.extended_data::bytea,'escape'), cc.title, cc.cnthndlr_handle

    from course_contents as cc
    
    inner join course_main as cm
    on cc.crsmain_pk1 = cm.pk1
    
    where cm.course_id like '%BUS-7700-SU-2020-%'
    and cc.cnthndlr_handle = 'resource/x-bbgs-partner-cloud'

    and (cc.title ilike '%MyLab%'
         or cc.title ilike '%Pearson%') 

【问题讨论】:

  • 请提供样本数据和期望的结果。
  • 您好,感谢您的回复。我想到了。发布解决方案。

标签: xml postgresql pgadmin-4 blackboard


【解决方案1】:

呃,我没有意识到 extended_data 列只是文本。

谢谢!

select cm.course_id, encode(cc.extended_data::bytea,'escape'), cc.title

    from course_contents as cc
    
    inner join course_main as cm
    on cc.crsmain_pk1 = cm.pk1
    
    where  cc.extended_data like '%ottawa2%'

【讨论】:

    猜你喜欢
    • 2021-10-26
    • 1970-01-01
    • 2021-05-19
    • 1970-01-01
    • 2022-07-02
    • 1970-01-01
    • 1970-01-01
    • 2011-04-16
    • 1970-01-01
    相关资源
    最近更新 更多