VistaDB 6
VistaDB / Developer's Guide / SQL Reference / Functions / System Functions / CONVERT
In This Topic
CONVERT
In This Topic

Explicitly converts an expression of one data type to another.

Convert
Copy Code
-- Converts the string 123 into an integer 
SELECT CONVERT( Int, '123') 

SQL Server Differences

VistaDB does not implement all the special rules and behavior exceptions of SQL Server. Since VistaDB is .Net based it relies on conversions in .Net to work.

SELECT CONVERT( DATETIME, 0); -- Does not work

0 Does not convert to a datetime in .Net.

For an example of how large and complex these rules are in SQL Server look at this MSDN CAST and CONVERT topic.

VistaDB does not support all of the same rules. These are in many cases behaviors specific to builds of SQL Server. If you are running into cast or convert errors try to think in terms of explicit declaration.

Remarks

CAST and CONVERT provide similar functionality

See Also