<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
That was the first thing I tried too, unfortunately illegal in Firebird.<br>
<br>
Phil.<br>
<br>
Paul Ritchie wrote:
<blockquote cite="mid05Apr19.113632nzst.336001@nzbws01.timemaster.co.nz"
type="cite">
<pre wrap="">Not sure about FireBird but in SQL Server that would be
INSERT INTO MYTABLE VALUES (1, Char(34))
Does that help?
Cheers,
Paul.
</pre>
<blockquote type="cite">
<pre wrap="">-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@ns3.123.co.nz">delphi-bounces@ns3.123.co.nz</a> [<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@ns3.123.co.nz">mailto:delphi-bounces@ns3.123.co.nz</a>]
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
<a class="moz-txt-link-abbreviated" href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a>
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
Delphi mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a>
</pre>
</blockquote>
</body>
</html>