Guest User

Untitled

a guest
Feb 7th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. ISNULL (orderid + 0, -1) as orderid,
  2. --this will remove IDENTITY property and make column not null
  3.  
  4. ISNULL (custid, -1) as custid, --make column not null
  5.  
  6. select isnull (orderid + 0, -1) as orderid,
  7. isnull (custid, -1) as custid,
  8. empid,
  9. isnull (cast(orderdate as date), '19000101') as orderdate,
  10. shipcountry,
  11. freight
  12. into Sales.MyOrders
  13. from Sales.Orders
  14. where shipcountry = N'Norway';
Add Comment
Please, Sign In to add comment