🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #3684

Re: SQL vraagje

#3684
From: KLinZ
Date: Sun, 09 Nov 2003 17:12
19 lines
1922 bytes
In news:9eurb.14091$lL3.444535@phobos.telenet-ops.be, Passero typed:

> Is het mogelijk om met sql een soort van replace door te voeren? IK
> heb een tabel met een 2000 duizend tal records. DIe verwijzen naar
> een bestand. Die bestanden beginnen allemaal met c:\ . Ik heb nu een
> nieuwe pc en die bestanden staan op f:\ ik zou dus een sql statement
> willen schrijven die c:\ vervangt door f:\ . Iemand een idee hoe ik
> dat doe?

Welk SQL dialect? Met T-SQL van MS-SQL server kun je dit bijvoorbeeld met de
functie Replace() doen.

  update table set veld = replace(veld, 'c:\', 'f:\')

Het is natuurlijk nog beter om helemaal geen driveletters in je database op
te slaan, maar dit door je applicatie af te laten handelen.

-- 
www.zenobits.com
Technical Details
Message-ID: <dBurb.2238$%W3.18823@amstwist00>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsgate.cistron.nl!amsnews01.chello.com!amstwist00.POSTED!not-for-mail
References: <9eurb.14091$lL3.444535@phobos.telenet-ops.be>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: 107324,f3ff54730288fb67
X-Google-Attributes: gid107324,public
X-Google-Thread: fcea4,f3ff54730288fb67
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2003-11-09 09:13:45 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsgate.cistron.nl!amsnews01.chello.com!amstwist00.POSTED!not-for-mail
From: "KLinZ" <klinz@NOSPAMzenobitsSPAMNO.com.invalid>
Newsgroups: be.comp.programming,nl.comp.programmeren
References: <9eurb.14091$lL3.444535@phobos.telenet-ops.be>
Subject: Re: SQL vraagje
Lines: 20
Organization: Inc.
MIME-Version: 1.0
Content-Type: text/plain;
 charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <dBurb.2238$%W3.18823@amstwist00>
Date: Sun, 9 Nov 2003 18:12:44 +0100
NNTP-Posting-Host: 212.187.71.152
X-Complaints-To: abuse@chello.nl
X-Trace: amstwist00 1068398025 212.187.71.152 (Sun, 09 Nov 2003 18:13:45 MET)
NNTP-Posting-Date: Sun, 09 Nov 2003 18:13:45 MET