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

 

Barbara,

 

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

 

is the same as saying:

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.

 

Hope that helps!

 

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,

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.

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 

 home Address='<@arg homeaddress>'  

 

In debug, I get an invalid syntax error and this is how the field displays in the query statement

  
Address='30024 Live Oak Trail'

How do I get this field name quoted in an Update Action, so it will recognize the space in the field name?

Thank you very much.

 

Barbara McCormick

Capital Pacific Homes, Inc.

[EMAIL PROTECTED]

480-777-2400 ext 211

 


WITH IMAGINATION
Planning, Implementation and Management of Web Applications

160 Pacific Highway North Sydney NSW Australia 2060
phone + 612 9929 9229 fax + 612 9460 4770 
web - www.wi.com.au email - [EMAIL PROTECTED]

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to