IT Community - Software Programming, Web Development and Technical Support

Need Querey

This is a discussion on Need Querey within the ASP and ASP.NET Programming forums, part of the Web Development category; hi, i have two tables EMP fields>ENO,ENAME,JOB,SAL,ROLE_NO, ,EMP1 fields>ENO,ENAME,JOB,SAL,...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > ASP and ASP.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 04:40 AM
Manikandan.S Manikandan.S is offline
D-Web Trainee
 
Join Date: Feb 2008
Posts: 8
Manikandan.S is on a distinguished road
Smile Need Querey

hi,
i have two tables EMP fields>ENO,ENAME,JOB,SAL,ROLE_NO,
,EMP1 fields>ENO,ENAME,JOB,SAL,ROLE_NO,REMARKS

i want to insert a record to emp1 from emp table and additionally i want to add REMARKS

i have tried these querey

STRING REM='GOOD'
INSERT INTO EMP1(ENO,ENAME,JOB,SAL,ROLE_NO,REMARKS) SELECT ENO,ENAME,JOB,SAL,ROLE_NO FROM EMP,REM

BUT IT SHOWS ERROR
THERE IS ANY WAY TO INSERT A RECORD IN THIS MANNER

IF IT PLS HELP ME


THANKYOU
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-11-2008, 04:55 AM
poornima poornima is offline
D-Web Sr.Programmer
 
Join Date: Dec 2007
Posts: 189
poornima is on a distinguished road
Smile Re: Need Querey

hi,

I used this sample query and tested,
insert into stud(sname,dept,mark) select sname,dept,'80' from stud2
Its working fine for me..

Try ur query like this,
INSERT INTO EMP1(ENO,ENAME,JOB,SAL,ROLE_NO,REMARKS) SELECT ENO,ENAME,JOB,SAL,ROLE_NO,'GOOD' FROM EMP.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 05:52 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0