problem in your single quotes and double quote string should be pass by single quotes in the query. already i send the sample let you have try that
uname="blah" sna=""blahblah" sta="Q" Select UserName,Sname,MobileNo,Msg,Typ,Lan,Stat from Generate where Username='" & uname & "'" & AND SName='" & sna & "'" & And Stat='" & sta & "'" ----- Original Message ----- From: Jeena Ajiesh To: [email protected] Sent: Sunday, March 29, 2009 3:44 PM Subject: [DotNetDevelopment] Re: Sql Insert-Select Oh NOOO... Its not returning anything... So there may be a problem in this Generate Table???? On Sun, Mar 29, 2009 at 1:54 PM, David Shen <[email protected]> wrote: Does Select UserName,Sname,MobileNo,Msg,Typ,Lan,Stat from Generate where (Username='blah') AND (SName='BlahBlah') And (Stat='Q') returns anything? On Sun, Mar 29, 2009 at 5:23 PM, Jeena Ajiesh <[email protected]> wrote: > Hi all, > Please help me in this SQL Query. Wen i run it, it shows "Query has executed > Successfully" > But the row has not been inserted into the table. > > Here is the Query: > > Insert into SSM > (Username,Sname,MobileNo,Msg,Typ,Lan,Flag) > Select UserName,Sname,MobileNo,Msg,Typ,Lan,Stat > from Generate > where (Username='blah') AND (SName='BlahBlah') And (Stat='Q') > > Can anyone help in this situation. > > -- > **************** > Regards, > ♪♥♫♥Ĵєєήǎ ♫♥♪♥ > Email: [email protected] > [email protected] > [email protected] > > -- Best Regards, David Shen -- **************** Regards, ♪♥♫♥Ĵєєήǎ ♫♥♪♥ Email: [email protected] [email protected] [email protected]
