Click here to Skip to main content
15,867,686 members
Home / Discussions / Database
   

Database

 
QuestionHow to insert record from XML document without using sp_xml_preparedocument procedure Pin
Software_Guy_12323-Dec-07 22:59
Software_Guy_12323-Dec-07 22:59 
GeneralRe: How to insert record from XML document without using sp_xml_preparedocument procedure Pin
Paul Conrad6-Jan-08 10:01
professionalPaul Conrad6-Jan-08 10:01 
Questionhow can export my image data... Pin
koolprasad200323-Dec-07 18:01
professionalkoolprasad200323-Dec-07 18:01 
AnswerRe: how can export my image data... Pin
Pete O'Hanlon23-Dec-07 23:33
subeditorPete O'Hanlon23-Dec-07 23:33 
GeneralMySQL and Images [modified] - RESOLVED Pin
Mike L.22-Dec-07 21:56
Mike L.22-Dec-07 21:56 
GeneralRe: MySQL and Images Pin
Paul Conrad23-Dec-07 6:09
professionalPaul Conrad23-Dec-07 6:09 
GeneralRe: MySQL and Images Pin
Mike L.23-Dec-07 11:38
Mike L.23-Dec-07 11:38 
GeneralRe: MySQL and Images Pin
Paul Conrad23-Dec-07 13:40
professionalPaul Conrad23-Dec-07 13:40 
GeneralRe: MySQL and Images Pin
Mike L.23-Dec-07 13:44
Mike L.23-Dec-07 13:44 
GeneralRe: MySQL and Images Pin
Paul Conrad23-Dec-07 13:52
professionalPaul Conrad23-Dec-07 13:52 
GeneralRe: MySQL and Images Pin
Mike L.23-Dec-07 13:59
Mike L.23-Dec-07 13:59 
GeneralRe: MySQL and Images Pin
Paul Conrad23-Dec-07 14:21
professionalPaul Conrad23-Dec-07 14:21 
GeneralRe: MySQL and Images Pin
Mike L.24-Dec-07 16:28
Mike L.24-Dec-07 16:28 
GeneralRe: MySQL and Images Pin
Paul Conrad24-Dec-07 16:44
professionalPaul Conrad24-Dec-07 16:44 
Generalconnecting to mssql 2005 express from vs2008 - RESOLVED Pin
l a u r e n22-Dec-07 21:06
l a u r e n22-Dec-07 21:06 
GeneralHelp in query design Pin
NetBot22-Dec-07 18:08
NetBot22-Dec-07 18:08 
GeneralRe: Help in query design Pin
Paul Conrad23-Dec-07 6:14
professionalPaul Conrad23-Dec-07 6:14 
GeneralTransfer records From Local To Host Pin
mehrdadc4822-Dec-07 9:01
mehrdadc4822-Dec-07 9:01 
GeneralRe: Transfer records From Local To Host Pin
DigiOz Multimedia22-Dec-07 11:49
DigiOz Multimedia22-Dec-07 11:49 
GeneralChecking Details to Display Pin
ShimnaMukundan21-Dec-07 18:46
ShimnaMukundan21-Dec-07 18:46 
GeneralRe: Checking Details to Display Pin
pmarfleet21-Dec-07 22:25
pmarfleet21-Dec-07 22:25 
GeneralCheck box = Unchecked Pin
s3rro21-Dec-07 8:00
s3rro21-Dec-07 8:00 
GeneralRe: Check box = Unchecked Pin
pmarfleet21-Dec-07 9:07
pmarfleet21-Dec-07 9:07 
GeneralRe: Check box = Unchecked Pin
Dave Kreskowiak21-Dec-07 9:51
mveDave Kreskowiak21-Dec-07 9:51 
This query won't update anything. It's an INSERT query, which means it creates new records.

There is also no WHERE clause, so even if you changes the INSERT to UPDATE, it would change ALL of the records in the table, not just the ones that have their [New?] field set to True.

You also don't specify which table your making an update to.

Your column name is also pretty bad. Don't use punctuation marks in table or column names. This will make for some very interesting debugging sessions if you do.

I think your query, assuming you want to change all the records that are tagged "new" to false and your [New?] column is of type "Yes/No", should look something like this:
UPDATE tableName
SET [New?] = False
WHERE [New?] = True



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007




GeneralRe: Check box = Unchecked Pin
GuyThiebaut23-Dec-07 10:44
professionalGuyThiebaut23-Dec-07 10:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.