如何显示查询的结果数据

发布于 2024-10-26 12:02:31 字数 960 浏览 3 评论 0原文

我正在运行以下 SQL 语句:

SELECT
    TS_MESSAGE,
    TX_SERVICENAME,
    TX_CONFIRMATION "Conf",
    TX_SS_MESSAGE,
    TX_OMS_MESSAGE,
    a.fl_resend_message
    from INTF_OMS.LOG_WEB_SERVICE_SS_INITIATED a
    where tx_servicename like '%mobileUserForcedToSignOff%' 
    --and tx_ss_message like '%e50702%'
    and tx_ss_message  like '%E30046%'
    and a.ts_message like '%25-JAN-11%'
    order by ts_message asc

我得到了我想要的结果,但是 tx_ss_message 列包含以下信息:

<?xml version="1.0" encoding="UTF-8"?>
<MobileUserForcedToSignOff>
  <MessageId></MessageId>
  <MessageDate>20110125</MessageDate>
  <MessageTime>1853</MessageTime>
  <DispatchUserId>E30046</DispatchUserId>
  <MobileUserId>e19952</MobileUserId>
</MobileUserForcedToSignOff>

我真正想要的是,当我运行查询时,它只返回 DispatchUserID、MessageDate 和 MobileUserID。

关于如何实现这一目标有什么建议吗?

I am running the following SQL statement:

SELECT
    TS_MESSAGE,
    TX_SERVICENAME,
    TX_CONFIRMATION "Conf",
    TX_SS_MESSAGE,
    TX_OMS_MESSAGE,
    a.fl_resend_message
    from INTF_OMS.LOG_WEB_SERVICE_SS_INITIATED a
    where tx_servicename like '%mobileUserForcedToSignOff%' 
    --and tx_ss_message like '%e50702%'
    and tx_ss_message  like '%E30046%'
    and a.ts_message like '%25-JAN-11%'
    order by ts_message asc

I get the results I want, however the columns tx_ss_message contains the following information:

<?xml version="1.0" encoding="UTF-8"?>
<MobileUserForcedToSignOff>
  <MessageId></MessageId>
  <MessageDate>20110125</MessageDate>
  <MessageTime>1853</MessageTime>
  <DispatchUserId>E30046</DispatchUserId>
  <MobileUserId>e19952</MobileUserId>
</MobileUserForcedToSignOff>

What I really want, is when I run the query, is for it to return ONLY The DispatchUserID, MessageDate, and MobileUserID.

Any suggestions on how to accomplish this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

李白 2024-11-02 12:02:31

在您已有的查询之外编写一个查询,用于解析您想要的 3 个项目的 xml

Write a query outside the one you already have that parses the xml for the 3 items you want

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文