The problem here is that I didn’t create
the table. If I really need to change the field name I’ll have to investigate
and find everywhere it’s referenced. IF that’s what I have to do, that’s what I
have to do, I guess.
-----Original Message-----
From: Jim Kass
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003
5:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Witango-Talk:
updating a field whose name contains a space
Is there a reason that
the field NAME contains a space? If not, then just change it to
"HomeAddress". I'm not sure how you put a space in the column
name, but my guess is that standard SQL will interpret it as an alias... i.e.
SELECT home address FROM
sometable
SELECT home AS address
FROM sometable
The "address"
is actually being used as an alias.
So in your update
statement:
UPDATE sometable SET home
address='somevar' WHERE someid=xx
SQL will complain that
the syntax is wrong, because you cannot use an alias.
oh, and if you put quotes
around it... it will be interpreted as a string so:
SELECT 'home address'
FROM sometable
will just give you a
bunch of results with 'home address' in them.
Jim Kass
Web Developer
--
Forestweb: The Source for Industry Intelligence
Best Content -- Most Relevant -- Best Delivery
http://www.forestweb.com
(310) 553 - 0008
-----Original
Message-----
From: Jason Schulz
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003
4:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Witango-Talk:
updating a field whose name contains a space
If the
update action isn't quoting the field name, you may need to write a custom SQL
action for the update so that you can explicitly quote the field name.
J.
On Thursday, Dec 11, 2003, at 10:50 Australia/Sydney, Barbara McCormick wrote:
Hello,
/fontfamily>
I have Witango 5 application that displays data from
a table using the results from a search action in a form. One of the field
names in this table contains a space: ‘Home Address’. The data displays
correctly, but won’t update. I get an invalid syntax error on that field.
/fontfamily>
I’ve dragged that field over from the table(under
datasources) into an update action. If I view that update as a SQL query, the
statement in questions appears as
/fontfamily>
home Address='<@arg homeaddress>'
/fontfamily>
/fontfamily>
In debug, I get an invalid syntax error and this is
how the field displays in the query statement
/fontfamily>
/fontfamily>Address='30024
Live Oak Trail'/fontfamily>
How do I get this field name quoted in an Update
Action, so it will recognize the space in the field name?
/fontfamily>
Thank you very much.
/fontfamily>
/fontfamily>
Barbara McCormick
/fontfamily>
Capital Pacific Homes, Inc.
/fontfamily>
[EMAIL PROTECTED]/color>/fontfamily>
480-777-2400 ext 211
/fontfamily>
/fontfamily>
/color>WITH
IMAGINATION
/color>Planning, Implementation and Management
of Web Applications
/color>/color>160
Pacific Highway North Sydney NSW Australia 2060
/color>/color>phone
+/color> 612 9929 9229/color>
/color>fax +/color>
/color>612 9460 4770/color>
/color>web -/color>
/color>www.wi.com.au/color>
/color>email -/color>
/color>[EMAIL PROTECTED]
/color>/fontfamily>