I'm still getting a crash course in SQL Server 2005 queries.
I have a query (a view actually):
And what I need is the
part to show the FileSize (which is a decimal, precision of 3) to be shown as a string if it's not null and I can't seem to figure it out. In Access I would normally do this:
I just don't know SQL Server's equivalent.
I have a query (a view actually):
VB.NET:
SELECT TOP (100) PERCENT dbo.Items.ItemID, dbo.Items.CatID, dbo.Items.Name, dbo.Items.URL, dbo.Items.Target, dbo.Items.SP,
dbo.Items.FileSize + ' ' + dbo.SizeTypes.SizeType AS TotalFileSize
FROM dbo.Items INNER JOIN
dbo.SizeTypes ON dbo.Items.SizeType = dbo.SizeTypes.SizeID
ORDER BY dbo.Items.CatID, dbo.Items.SortOrder
VB.NET:
dbo.Items.FileSize + ' ' + dbo.SizeTypes.SizeType AS TotalFileSize
VB.NET:
IIf([FileSize] Is Not Null, [FileSize] & " " & [SizeTypes].[SizeType] , "") As TotalFileSize