-1

テーブルにこれらの行があります:詳細列の製品

Product P0001 has 1587 samples
Product P0002 has 5454 samples
...

SQLクエリを使用してこれらの行を次のように変更したい:

Produit P0001 a 1587 échantillons
Produit P0002 a 5454 échantillons
...

どうやってやるの?

4

3 に答える 3

1

これを試して:

update mytable set myfield =
REPLACE(
    REPLACE(
        REPLACE(myfield, 'Product', 'Produit')
    , 'has', 'a')
, 'samples', 'échantillons')
于 2013-10-25T06:56:05.713 に答える
1

この更新プログラムを使用できます。

UPDATE YourTable
SET YourField = REPLACE(REPLACE(REPLACE(YourField, 'Product', 'Produit'), 'has', 'a'), 'samples', 'échantillons')
于 2013-10-25T06:56:22.633 に答える
0

これを試してみてください-

UPDATE dbo.Product Set <col1> = 'a', <col2>='échantillons' where <col1> = 'has'
于 2013-10-25T07:09:00.137 に答える