SQL查询从列中提取文本并将其存储到同一记录中的其他列 [英] SQL query to extract text from a column and store it to a different column in the same record

查看:122
本文介绍了SQL查询从列中提取文本并将其存储到同一记录中的其他列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些SQL查询的帮助...

I need some help with a SQL query...

我有一个SQL表,它保存在已提交表单的列的详细信息。我需要获取存储在该列中的文本的一部分,并将其放在同一行的不同列中。

I have a SQL table that holds in a column details of a form that has been submitted. I need to get a part of the text that is stored in that column and put it into a different column on the same row. The bit of text that I need to copy is always in the same position in the column.

任何帮助都会感激的家伙...我的想法已经空白: >

Any help would be appreciated guys... my mind has gone blank :">

推荐答案

UPDATE  mytable
SET     other_column = SUBSTRING(column, begin_position, length)

这篇关于SQL查询从列中提取文本并将其存储到同一记录中的其他列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆