Convert SQL Server views into PostgreSQL format
|[SQL Server to PostgreSQL Converter] [About Migration] [Types]|
When migrate a database from SQL Server to PostgreSQL one of the steps is conversion of views into the destination format. This whitepaper discovers basic rules of this conversion.
'TOP (100) PERCENT'pattern, it must be removed in PostgreSQL query. If there is another value in CREATE VIEW statement, it can be replace by the following code in PostgreSQL:
SELECT ... LIMIT N;where N is number of rows to limit result of the query.
iif(condition, val1, val2)that returns one of two values depending on condition must be converted into
CASE WHEN condition THEN val1 ELSE val2 END;
'dbo'must be replaced by PostgreSQL equivalent
string1 + string2must be replaced by
Have questions? Contact us