Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ISNULL (orderid + 0, -1) as orderid,
- --this will remove IDENTITY property and make column not null
- ISNULL (custid, -1) as custid, --make column not null
- select isnull (orderid + 0, -1) as orderid,
- isnull (custid, -1) as custid,
- empid,
- isnull (cast(orderdate as date), '19000101') as orderdate,
- shipcountry,
- freight
- into Sales.MyOrders
- from Sales.Orders
- where shipcountry = N'Norway';
Add Comment
Please, Sign In to add comment