|
Prev: UK Postcodes
Next: Relocation error during link
From: "Jesse" on 24 Jan 2006 10:23 ------=_NextPart_000_0005_01C620D0.2A391BF0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am trying to create a query that will include HTML code for a link for = a datagrid that I've got. However, I'm getting the error, "Truncated = incorrect DOUBLE value" when I execute the following query: SELECT *, '<a href=3DCamperSelItems.aspx?ID=3D' + CAST(ID AS Char) + '>Select = Items</a>' AS ItemLink FROM Campers=20 WHERE FamilyID=3D1 If I replace the CAST(ID AS Char) statement with 1, and remove the = quotes around it ('<a href=3DCamperSelItems.aspx?ID=3D1>Select = Items</a>') it works just fine. So, I know that it's the ID field, and = how I'm trying to get that to be part of the link that it's got a = problem with. So, what is the correct way to do this? Thanks, Jesse ------=_NextPart_000_0005_01C620D0.2A391BF0--
From: "Jesse" on 24 Jan 2006 10:27 Never mind, I've found that if I use CONCAT(), it works just fine. It's hard for me to get used to using CONCAT instead of just using the "+". I've made this mistake several times. Thanks, Jesse ----- Original Message ----- From: "Jesse" <jlc(a)msdlg.com> To: <mysql(a)lists.mysql.com> Sent: Tuesday, January 24, 2006 10:23 AM Subject: Truncated Incorrect Double Value I am trying to create a query that will include HTML code for a link for a datagrid that I've got. However, I'm getting the error, "Truncated incorrect DOUBLE value" when I execute the following query: SELECT *, '<a href=CamperSelItems.aspx?ID=' + CAST(ID AS Char) + '>Select Items</a>' AS ItemLink FROM Campers WHERE FamilyID=1 If I replace the CAST(ID AS Char) statement with 1, and remove the quotes around it ('<a href=CamperSelItems.aspx?ID=1>Select Items</a>') it works just fine. So, I know that it's the ID field, and how I'm trying to get that to be part of the link that it's got a problem with. So, what is the correct way to do this? Thanks, Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=myodbc(a)freebsd.csie.nctu.edu.tw
|
Pages: 1 Prev: UK Postcodes Next: Relocation error during link |