@ Leandro Amorim

Thanks for the reply.

For the select statement, only the NNUB & Name will be the same, the other
fields are taking from the textbox in the page.
Table Group contains GroupName,Username,NNUB & Name
All the other fields are inserting to the table from the textbox variables.




On Wed, Aug 5, 2009 at 6:30 PM, Leandro Amorim <[email protected]> wrote:

>
> Hello Jeena, how are you?
>
>    So, only checking if I understood. You want to make insertion in
> table from a SELECT query, right?
>
>    If, that what I says was right... here a suggestion:
>
> Dim strSql As String =  " Insert into Mess
> (UserName,Number,Title,Lan,Txt,Status) " +
>                                   " (Select
> UserName,NNub,Title,Lan,Txt,Status "
>                                   " From Group Where GroupName='" &
> dllgroup.SelectedItem.Text & "' and UserName='" & strUserName & "')"
>
> I use this to populate a table in SQL SERVER from MS. Maybe  the
> others database have the same feature, but in diferent sintax.
>
> Try to execute this without any change, If do not work, try to make
> the replaces in the SQL query and execute again.
>
> PS: The SELECT query MUST be between parenthesis.
> Any question...
> [email protected] - GTalk
> [email protected] - MSN
>
> Huges,
> Leandro Amorim
>



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

Reply via email to