I am using SQL 2005.
Microsoft SQL Server Management Studio 9.00.1399.00
I just started noticing that the data in my fields had trailing white space in it equaling the fieds size less the data.
Example:
"SAN/NAS "
The field type/size is: nchar(25)
Even when I do the following the resulting data still has the while space:
I am new to programming and very new to sql. I noticed this while binding the table to a listbox control.
thanks in advance for your insight.
Microsoft SQL Server Management Studio 9.00.1399.00
I just started noticing that the data in my fields had trailing white space in it equaling the fieds size less the data.
Example:
"SAN/NAS "
The field type/size is: nchar(25)
Even when I do the following the resulting data still has the while space:
Code:
UPDATE [cmdb].[dbo].[device_type]
SET [device_type_name] = 'SAN/NAS'
WHERE [device_type_id] = '4'
I am new to programming and very new to sql. I noticed this while binding the table to a listbox control.
Code:
ddl_deviceType.DataSource = dbu.GetSqlDataReader(sqlDatasource, sqlCatalog, sqlSecurity, sqlSelect);
ddl_deviceType.DataValueField = "device_type_id";
ddl_deviceType.DataTextField = "device_type_name";
ddl_deviceType.DataBind();
ddl_deviceType.Items.Insert(0, new ListItem("- Select Device Type -"));
thanks in advance for your insight.