Thanks for your reply but,
Im taking the value from the table while inserting itself.
In each row inserting, the name will be different. So it cant be stored in a
variable and do like a for loop.
I have to attach the NAME field(like the NNUB field) directly to the
insertion statment from the select statement.

Hope You got my point....

Thank You

On Wed, Aug 5, 2009 at 6:00 PM, The_Fruitman <[email protected]>wrote:

>
> It is possible to do what you are asking.  My concern with it would be
> why would you want to do this in your database?  I see poor database
> designs all the time where information is duplicated and concatenated
> and stored in multiple tables.
>
> To do what you're asking, why not do the string manipulation in your
> VB code and then pass that variable as a parameter in your insert
> statement.
>
> I.E. (pseudocode)
> Dim strConcat as String
> strConcat = Name & " " & strMessage
>
> Dim sql as String = Insert into tableName(concatItem) value
> (strConcat)
>
>
>
> On Aug 5, 7:41 am, Jeena Ajiesh <[email protected]> wrote:
> > Hi all,
> >
> > Can we concatenate a string value with the value from database?
> >
> > For Eg: I have to get the names from database and concatenate with a
> textbox
> > value and store it in database again in different table.
> >
> > What i have tried to do is:
> >
> > Dim strSql As String = " Insert into
> > Mess(UserName,Number,Title,Lan,Txt,Status) Select '" & strUserName & "',*
> > NNub*,'" & strTitle & "','" & strLan & "',*Name* '" &
> strMessage.Replace("
> > '", "''") & "','" & StrStatus & "' From Group Where GroupName='" &
> > dllgroup.SelectedItem.Text & "' and UserName='" & strUserName & "'"
> >
> > Here im taking the NNub from the database directly.What i need is i have
> to
> > concatenate Name & strMessage.
> >
> > So that it will save  in database; if strmessage is "HI"
> >
> > Tom HI
> >
> > Jerry HI
> >
> > Like this.
> >
> > Is it possible. Because i tried my level best, pls help me if anyone can
> > advise on this...
> >
> > --
> > ****************
> > Thanks & Regards,
> > Jeena Ajiesh
>



-- 
****************
Thanks & Regards,
Jeena Ajiesh

Reply via email to