[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    RE: [postgis-users] convert integer to varchar
From:       "Gregory Williamson" <Gregory.Williamson () digitalglobe ! com>
Date:       2008-05-25 23:51:47
Message-ID: 8B319E5A30FF4A48BE7EEAAF609DB233015E3940 () COMAIL01 ! digitalglobe ! com
[Download RAW message or body]

--===============0541210571==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C8BEC2.4B402D8B"

This is a multi-part message in MIME format.


Bui Anh Tin shaped the aether and said:

> 
> SELECT ( '../admin.aspx?com=addmap&type=edit&id=' ,mapid) as edit form
> mytable
> 
> mapid is interger
> but it error
> 

It helps if you include the version of PostGreSQL that you are running (select \
version() at a psql prompt will tell you); I suspect that this is 8.3.x because it \
has gotten rid of some implicit casts, especially where numbers are concerned.

You might try:

 SELECT ( '../admin.aspx?com=addmap&type=edit&id=' || mapid::text)

This is untested as the SQL you provide is not the SQL you ran -- "as edit form" is \
probably "AS edit FROM" -- not the transposed letters in the last word. It helps if \
you can actually quote exactly what you did since an accidentally introduced typo can \
break an SQL statement.

I am guessing you want to append the mapid value to a string -- "||" is one \
concatenation operator.

HTH,

Greg Williamson
Senior DBA
DigitalGlobe

Confidentiality Notice: This e-mail message, including any attachments, is for the \
sole use of the intended recipient(s) and may contain confidential and privileged \
information and must be protected in accordance with those provisions. Any \
unauthorized review, use, disclosure or distribution is prohibited. If you are not \
the intended recipient, please contact the sender by reply e-mail and destroy all \
copies of the original message.

(My corporate masters made me say this.)


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [postgis-users] convert integer to varchar</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Bui Anh Tin shaped the aether and said:<BR>
<BR>
&gt;<BR>
&gt;&nbsp; SELECT ( '../admin.aspx?com=addmap&amp;type=edit&amp;id=' ,mapid) as edit \
form<BR> &gt; mytable<BR>
&gt;<BR>
&gt; mapid is interger<BR>
&gt; but it error<BR>
&gt;<BR>
<BR>
It helps if you include the version of PostGreSQL that you are running (select \
version() at a psql prompt will tell you); I suspect that this is 8.3.x because it \
has gotten rid of some implicit casts, especially where numbers are concerned.<BR> \
<BR> You might try:<BR>
<BR>
&nbsp;SELECT ( '../admin.aspx?com=addmap&amp;type=edit&amp;id=' || mapid::text)<BR>
<BR>
This is untested as the SQL you provide is not the SQL you ran -- &quot;as edit \
form&quot; is probably &quot;AS edit FROM&quot; -- not the transposed letters in the \
last word. It helps if you can actually quote exactly what you did since an \
accidentally introduced typo can break an SQL statement.<BR> <BR>
I am guessing you want to append the mapid value to a string -- &quot;||&quot; is one \
concatenation operator.<BR> <BR>
HTH,<BR>
<BR>
Greg Williamson<BR>
Senior DBA<BR>
DigitalGlobe<BR>
<BR>
Confidentiality Notice: This e-mail message, including any attachments, is for the \
sole use of the intended recipient(s) and may contain confidential and privileged \
information and must be protected in accordance with those provisions. Any \
unauthorized review, use, disclosure or distribution is prohibited. If you are not \
the intended recipient, please contact the sender by reply e-mail and destroy all \
copies of the original message.<BR> <BR>
(My corporate masters made me say this.)<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>



_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

--===============0541210571==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic