Jump to content

W3Falcon

Members
  • Posts

    2
  • Joined

  • Last visited

W3Falcon's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thank you, for the interest.Really i am a newbie in this questions. Sorry if my questions are simples or the language incorrect ( i am spanish)The answers:I´m working with Asp Net(microsoft visual studio net 2003), Vbscript and i´m using Sql server2000 enterprise(with XP).I make a couple of stored procedures, but...before using it i´ll prefer try with the code in Asp Net.In conclusion:I have a table with telephones (the telephones in use). I am going to create a new table with all telephones, including "the telephones in use". And, with a select i want to put a "0" to telephones free, and "1" to the others.(with the mentioned "insert"(based in the "select" of the existing table).I can do it in two steps, with the asp. But i had the impression that it was possible to do this only with Sql in one query. May be i was wrong. Only want to satisfy my curiosity.
  2. In a query like this:insert into "table1" ("field1") values ('" & 1 & "') where "field2" in (select "field3" from "table2" where "field3" like '881090%')*field2 from table1 = field3 from table2 (for example: "telephone numbers")*in table1 we have a list of all telephone numbers. In table2 we have the telephones assigned to clients.(only a few of the total).If the telephone of the client is in use, i want to assign a number "1" to a control field in table1 and if it´s not in use (not exist in table2) i want to assign a number "0" in the control field.I think the query i wrote, works. With other query i can assign the number "0" to the telephones that not in use.My question: Can i do all in the same query?
×
×
  • Create New...