insert where not in

insert into table varcharColumn , int

where varcharValue is not in varcharColumn
LVL 1
rgb192Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
INSERT INTO YourTable (colVarchar, colInt)
SELECT SomeVarcharColumn, SomeIntColumn
WHERE SomeVarcharColumn <> 'SomeVarcharValue'
0
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
INSERT INTO YourTable (colVarchar, colInt)
SELECT SomeVarcharColumn, SomeIntColumn
WHERE SomeVarcharColumn NOT IN (SELECT colVarchar From YourTable )
0
 
rgb192Author Commented:
thanks

both work
0
All Courses

From novice to tech pro — start learning today.