我的表格有3列。
id, Company and adress
i 如今发现一只灯泡,挽救了公司-公司和公司在压力充气的SOMETPASS中的堡垒,即纠正了ug,现在试图将数据放在合适的地方。
每一名受胁迫者都有一些,因此,我的猜测是,如果公司栏中有一些的话,最容易的办法是调换压力和公司栏目(如果公司名称中应当有几处,这赢得了很多事情:p)。
如何在TSQL中写这句话?
我的表格有3列。
id, Company and adress
i 如今发现一只灯泡,挽救了公司-公司和公司在压力充气的SOMETPASS中的堡垒,即纠正了ug,现在试图将数据放在合适的地方。
每一名受胁迫者都有一些,因此,我的猜测是,如果公司栏中有一些的话,最容易的办法是调换压力和公司栏目(如果公司名称中应当有几处,这赢得了很多事情:p)。
如何在TSQL中写这句话?
我不敢肯定,这是在这里做的正确事情,但因为我可以想到应该做的任何其他选择。
Update dbo.MyTable
Set Company = Address,
Address = Company
Where Company like %[0-9]%
你们可以尝试:如果公司压力已经包含一些内容的话,就提供简单保护,避免掉头。
insert into COMPANY (NAME, ADDRESS)
VALUES ( 2 bld d Italie , CA ) ,
( Take 2 , anselmo street 234 ) ,
( Microsoft , 1 Microsoft Way Redmond ),
( lake street 14 , Norton ),
( lake street 17 , trendMicro );
SELECT * FROM COMPANY
UPDATE COMPANY set NAME = ADDRESS, ADDRESS = NAME
WHERE NAME like %[0-9]% and (ADDRESS not like %[0-9]% )
SELECT * FROM COMPANY
你们可以注意到,2行得起的电离灯被蒸发。
I ve got two tables: TableA Col1 Col2 TableB Col3 Col4 I want to join them together: SELECT * from TableA join TableB ON (...) Now, in place of ... I need to write an expression ...
TSQL query to select all records from Customer that has an Order and also select all records from customer that does not have an Order. The table Customer contains a primary key of CustomerID. The ...
I have a stored procedure which takes an XML parameter and inserts the data into multiple tables. If I run the stored procedure into a database using a SSMS query window, everything works fine. ...
Have a win 2003 box with MSSQL 2005 running on it. There is a database which is populated every morning with new/modified SalesOrder made the previous day. The database has several tables: SalesOrder, ...
I have a table with the following fields Id Name IsPublic i need to write a sql query that updates IsPublic to false where name has a duplicate. Only one of the duplicates should have IsPublic = ...
I have a Transact-SQL query that uses the IN operator. Something like this: select * from myTable where myColumn in (1,2,3,4) Is there a way to define a variable to hold the entire list "(1,2,3,4)"? ...
I ve got a content management system that contains a hierarchical structure of categories, with sub-categories subject to different ordering options at each level. Currently, that s retrieved by a (...
I m trying to transform the SQL Query below into Linq to SQL select Categorias.IdCategoria, Categorias.Nome, SUM(lancamentos.valor) from lancamentos left outer join Categorias on Lancamentos....