insert statement question

Results 1 to 2 of 2

Thread: insert statement question

  1. #1
    Join Date
    Dec 1969

    Default insert statement question

    Hi there,<BR><BR>I am trying to insert some values into a table and one of the values is negative of the values i am selecting.<BR><BR>OK here is the query<BR><BR>insert into table1 values(select -field1, 100, 120 where employeename like &#039;%John%&#039;)<BR><BR>it should insert negative value of field1, 100 and 120.<BR><BR>it giving incorrect syntex at "select" and at &#039;)&#039; errors.<BR>if I run only the select statement it is selecting right values.<BR><BR>Some help please

  2. #2
    Join Date
    Dec 1969

    Default RE: insert statement question

    insert into table1 select -field1, 100, 120 where employeename like &#039;%John%&#039;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts