Not sure about FireBird but in SQL Server that would be INSERT INTO MYTABLE VALUES (1, Char(34))
Does that help? Cheers, Paul. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Phil Middlemiss > Sent: Tuesday, 19 April 2005 11:28 a.m. > To: NZ Borland Developers Group - Delphi List > Subject: [DUG] casting a number as a char in IB SQL > > I'm running into difficulty trying to convert the number 34 into a CHAR > (length 1) in an INSERT statement using Firebird/Interbase. This is the > query as I'm trying it: > > INSERT INTO MYTABLE VALUES(1, Cast(34 as CHAR)) > > which it doesn't like - it seems to be trying to convert 34 into the > string '34' which is 2 characters instead of #34. > > Am I trying to do the impossible? The Character Set for the relevant > field is 'WIN1251' does that make a difference? > > Cheers, > Phil. > > _______________________________________________ > 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
