The first obvious quest...why is there a space in a field name for a start? Second, not sure whate DB you are using, but MSSQL and Access both will let you put square brackers around the field name, i.e. [school id]
If it was me, I woudl replace the space with an underscore, i.e. school_id Jeremy -----Original Message----- From: "Dennis Chuah" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>, "NZ Borland Developers Group - Delphi List" <[email protected]> Cc: Date: Thu, 1 Sep 2005 13:21:34 +1200 Subject: Re: [DUG] SQL - INSERT > > Use double quotes for your field name and you also need the name of the > table you are inserting into. > > INSERT INTO <tablename> ("School ID", "Name") > VALUES('22222', 'TEST') > > > ----- Original Message ----- > From: "John" <[EMAIL PROTECTED]> > To: "DUG" <[email protected]> > Sent: Thursday, September 01, 2005 1:15 PM > Subject: [DUG] SQL - INSERT > > > > Hi folks > > > > Assume I have a table with a field name including a space character > (e.g. > > "School ID"). > > > > How can I specify an INSERT query, as the query listed below fails > due to > > the space character in the field name! > > > > > > INSERT INTO ('School ID', 'Name') > > VALUES('22222', 'TEST') > > > > > > Regards > > John > > > > _______________________________________________ > > Delphi mailing list > > [email protected] > > http://ns3.123.co.nz/mailman/listinfo/delphi > > > _______________________________________________ > Delphi mailing list > [email protected] > http://ns3.123.co.nz/mailman/listinfo/delphi _______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi
