Can someone help me with SQL Server CAST
to text
datatype? I'm trying to get the long text to display using the CAST function, but it wont work if I am retrieving from more than 1 table. Perhaps I've created the statement incorrectly.
$from = 'RealEstate AS RE, Models AS M, Catalogue AS C';
$select = 'CAST(RE.Details AS TEXT) AS RE.Details, RE.Postcode, RE.Suburb,
M.ModelName, M.ModelID, RE.HouseID, RE.ContactName, RE.ContactPhone, RE.PlanName,
RE.Address, RE.Street, RE.Price, RE.StreetNo, RE.CatID, RE.Fixed';
$query = mssql_query("SELECT DISTINCT $select
FROM RealEstate AS RE, Models AS M
WHERE RE.HouseID=$hid
AND RE.ModelID=M.ModelID");