Guest_imported
New member
- Jan 1, 1970
- 0
i have a number of sql statements that work fine with jet 4.0 but do not work with sql server. my application needs to be able to use both jet 4.0 and sql server. here is an example of one of them:
SELECT ID AS [Common1ID], Trim(IIf(IsNull(LastName), '', LastName) + IIf(IsNull(FirstName), '', IIf(FirstName = '', '', ', ' + FirstName) + IIf(IsNull(MiddleName), '', ' ' + MiddleName))) + chr(13) + chr(10) + IIf(IsNull(Address), '', Address) +chr(13) + chr(10) + IIf(IsNull(City), '', City) + IIf(IsNull(State), '', ',' + State) + IIf(IsNull(Zip), '', Zip) AS [Name], Trim(IIf(IsNull(FirstName), '', FirstName) + IIf(IsNull(MiddleName), '', ' ' + MiddleName) + IIf(IsNull(LastName), '', LastName)) AS [Signature] FROM Common
if anyone could create a sql server sql statement that would return the same results as this jet 4.0 statement it would be great. thanks.
SELECT ID AS [Common1ID], Trim(IIf(IsNull(LastName), '', LastName) + IIf(IsNull(FirstName), '', IIf(FirstName = '', '', ', ' + FirstName) + IIf(IsNull(MiddleName), '', ' ' + MiddleName))) + chr(13) + chr(10) + IIf(IsNull(Address), '', Address) +chr(13) + chr(10) + IIf(IsNull(City), '', City) + IIf(IsNull(State), '', ',' + State) + IIf(IsNull(Zip), '', Zip) AS [Name], Trim(IIf(IsNull(FirstName), '', FirstName) + IIf(IsNull(MiddleName), '', ' ' + MiddleName) + IIf(IsNull(LastName), '', LastName)) AS [Signature] FROM Common
if anyone could create a sql server sql statement that would return the same results as this jet 4.0 statement it would be great. thanks.