Author |
Topic |
mallikohomada
Starting Member
5 Posts |
Posted - 2008-12-08 : 09:15:31
|
Hi allI need to find out how to apply an empty string to a file.I have tow queries, 1 )SELECT FileList.sFilenameINTO holdkeyFROM FileListGROUP BY sFilenameHAVING count(*) > 1This check for any duplicate line then create a new table “holdkey”And past it there.Now I want to compare the the original table with the duplicate table “holdkey”And copy an empty string in to those duplicate rowsUPDATE FileListSET FileList.sFilename= ‘’WHERE FileList.sFilename = holdkey.sFilenameMy issue is, every time I run this, it ask for set pareameterIf is do set @sFilename=’’ It displays 0 rowsa updatedAny help on this pleaseps I ma new to sql |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-08 : 09:22:06
|
[code]UPDATE fSET f.sFilename= ''FROM FileList fJOIN holdkey hON f.sFilename = h.sFilename[/code] |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-12-08 : 09:38:17
|
quote: Originally posted by visakh16
UPDATE fSET f.sFilename= ''FROM FileList fJOIN holdkey hON f.sFilename = h.sFilename
In ACCESS it should beUPDATE fFROM FileList fJOIN holdkey hON f.sFilename = h.sFilenameSET f.sFilename= ''MadhivananFailing to plan is Planning to fail |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-08 : 09:43:33
|
ah...missed that its Access forum... |
 |
|
mallikohomada
Starting Member
5 Posts |
Posted - 2008-12-08 : 10:07:02
|
guys thanks for the replyI still get syntax error UPDATE statmentUPDATE filelistFROM FileListJOIN holdkey ON filelis.sFilename = holdkey.sFilenameSET filelist.sFilename= ''also if you dont mind explaining it(only if you wish)thx |
 |
|
mallikohomada
Starting Member
5 Posts |
Posted - 2008-12-09 : 06:09:22
|
Please can some one help me on this.thanks |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-12-10 : 07:27:09
|
UPDATE fFROM FileList fJOIN holdkey hON f.sFilename = h.sFilenameSET f.sFilename= ''MadhivananFailing to plan is Planning to fail |
 |
|
mallikohomada
Starting Member
5 Posts |
Posted - 2008-12-17 : 06:17:39
|
sorry, I still get the "syntax error in UPDATE statment" |
 |
|
nheidorn
Starting Member
28 Posts |
Posted - 2008-12-18 : 14:08:44
|
Try this:UPDATE FileList INNER JOIN holdkey ON FileList.sFileName = holdkey.sFileNameSET FileList.sFileName = ''; Access is pretty picky about the syntax of UPDATE statements. |
 |
|
mallikohomada
Starting Member
5 Posts |
Posted - 2008-12-19 : 07:02:28
|
u r the man, yes it workedthank you very much |
 |
|
|