Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL server

Status
Not open for further replies.

changneil88

Technical User
Aug 5, 2004
10
US
I have a database that I need to import to a sql table and the criteria should be to import only valid records (invalid records are items w/o description, Valid records are items with part #, descp, and price.) How can I accomplish this in sql? I know in MS access I can just run a query like if description IS NULL delete it. The database is too big for access to handle so I have to it in SQL.

Thanks,
CH
 
You can probally use the same delete query from access for the SQL Server.

The basic syntax will be:
Code:
delete from table
where description is null

You can see more info about the full syntax for the delete statement in BOL.

Denny

--Anything is possible. All it takes is a little research. (Me)
 
You can try something like
Code:
SELECT  PartNumb, Descp, Price
FROM tablename
WHERE len(Descp)>1
and use the query in the transform data task properties SQL query window.

BTW, I'm assuming Descp = description.

Krickles | 1.6180

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top