Question : select where last digits

select * from table
where invoice like  where invoice like '%183449%'

invoice table is 10183449

how can I select where invoice = '183449'

Answer : select where last digits

oops, typo there

the insert should be "left join" not just "left"

insert tableA
select * from tableB t1
left join TableA t2 on t1.code = t2.code
where t2.code is null

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
CREATE PROCEDURE updateinsert
as
BEGIN TRANSACTION
BEGIN TRY

update a
set 	a.fname = b.fname,
	a.lname = b.fname
from tableA a
inner join table b on a.code = b.code

insert tableA
select * from tableB t1
left join TableA t2 on t1.code = t2.code
where t2.code is null
 
 COMMIT
END TRY
BEGIN CATCH
  ROLLBACK
END CATCH
Random Solutions  
 
programming4us programming4us