Hi GEORGE,

> The typical way refers to the update syntax. Ideally,
> I would like to be able to do something like that:
> - read the value of the variable through a read
> statement.
> -Specify the value to be appended.
> -Do the task.
>
> Could you please help me out with that?

> > > I would like to ask a simple question about the
> > way
> > > MySQL handles string variabels. Say i have a
> > variable
> > > whose value is foo and I want to change it to
> > foobar.
> > >
> > > Instead of doing it the 'typical' way, I would
> > like to
> > > ask whether there is any mysql command that will
> > allow
> > > me to say read the value of the variable and then
> > > append bar to it.
> >
> > What is the "typical" way that you don't want to
> > use?
> >
> > Check out CONCAT( foo, bar ) = man ref 6.3.2 String
> > Functions

Sounds straightforward enough:

- SELECT colNm [etc] FROM ... WHERE ...
- ascertain the "bar" to be appended
- UPDATE tblNm SET colNm = CONCAT( colNm, "bar" ) WHERE ...

The ticklish part is making sure you get the WHERE clause(s) correct.

I'm not sure what you wanted me to say about the middle task. That would
depend upon where you were getting the data to be appended from, and if
you are using native-MySQL or some language calling MySQL across an
API/whatever.

I hope I have understood your question correctly,
=dn


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to