I need to move some data from one DB to another but as the layout is not the same, I need a to add a condition to this:
If Genderbit == 1 (from CRM.dbo.Person), a string 'M' should be inserted into ewa.Ansprechpartner.Gender, else a string 'F' should be used.
USE easyWinArtTest
GO
INSERT INTO ewa.Ansprechpartner(Vorname, Nachname, Email, Telefon, Telefax, Gender)
SELECT Forename, Surname, EMailAddress, Phone, Fax, [genderbit]
FROM CRM.dbo.Person
How is this done with SQL Server?