Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Entering a value instead of a column name
Sat, Aug 11 2012 12:10 PMPermanent Link

Ray

Yoga Life Style

In the Database system ultility I've made the following selection.

SELECT [type1]
FROM customer
WHERE (LEFT([company] FOR 2) = 'ww')

And I have the set of records I want to update, only I evidently don't know how.
All I want to do is put 'wholesale' in the type1 field in all the records.

I tried IF statements but they wanted field names not a string to put in.
So I tried update set and was told that the program was looking for an end statement.

I am very new at this and I'm guessing this is easy for someone out there.  Please help.
Sat, Aug 11 2012 1:23 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Ray.

UPDATE customer
  SET type1 = 'wholesale'
  WHERE LEFT(company FOR 2) = 'ww'


--
Fernando Dias
[Team Elevate]
Sat, Aug 11 2012 1:59 PMPermanent Link

Ray

Yoga Life Style

Fernando,
    You nailed it.  I am very happy.  I spent 5 hours trying to make it go before reaching out.  Is there a book or some other resource that breaks it down and makes it plain or is it all trial and error after reading some documentation and copying what code you can find?
Peace and much Gratitude,
Ray


Fernando Dias wrote:

Ray.

UPDATE customer
  SET type1 = 'wholesale'
  WHERE LEFT(company FOR 2) = 'ww'


--
Fernando Dias
[Team Elevate]
Sat, Aug 11 2012 4:09 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Ray,

<< Is there a book or some other resource that breaks it down >>

DBISAM SQL is a subset of SQL-92, with a lot of very cool extensions Smile.
If you are new to SQL, any introductory SQL book would give you a good insight about the basics.
Also, the DBISAM online manual is a very good and complete reference. There is a section about SQL here:

http://www.elevatesoft.com/manual?action=topics&id=dbisam4&product=rsdelphiwin32&version=XE2&section=sql_reference

--
Fernando Dias
[Team Elevate]
Sun, Aug 12 2012 7:15 AMPermanent Link

Ray

Yoga Life Style

Thank you.

Fernando Dias wrote:

Ray,

<< Is there a book or some other resource that breaks it down >>

DBISAM SQL is a subset of SQL-92, with a lot of very cool extensions Smile.
If you are new to SQL, any introductory SQL book would give you a good insight about the basics.
Also, the DBISAM online manual is a very good and complete reference. There is a section about SQL here:

http://www.elevatesoft.com/manual?action=topics&id=dbisam4&product=rsdelphiwin32&version=XE2§ion=sql_reference

--
Fernando Dias
[Team Elevate]
Image