I have the following SQL
IF OBJECT_ID('tempdb..#TempTable_Lockbox_File_Header_Record') IS NOT NULL DROP TABLE #TempTable_Lockbox_File_Header_Record ; IF OBJECT_ID('tempdb..#TempTable_Lockbox_Batch_Header_Record') IS NOT NULL DROP TABLE #TempTable_Lockbox_Batch_Header_Record ; -- -- Temporary Table [#TempTable_Lockbox_File_Header_Record] will be used to house the File Header -- Record data columns for Lockbox file format -- CREATE TABLE [#TempTable_Lockbox_File_Header_Record] ( RecordType CHAR(2), RecordDescription CHAR(12) ) ; -- -- Load Temp Table [#TempTable_Lockbox_File_Header_Record] with the correct data elements to -- satisfy the Lockbox File Header Record format -- INSERT INTO [dbo].[#TempTable_Lockbox_File_Header_Record] ( RecordType, RecordDescription ) SELECT 'FH', 'TEST' ; SELECT * FROM [dbo].[#TempTable_Lockbox_File_Header_Record] ;
When I send my query results to a file in SQL Server Management Studio, how come I'm seeing the following in Notepad++?
FH TEST
"FH" which I thought should be in a CHAR(2) data column is there but "TEST" seems to start in Column 6...not column 3 as I would have expected. I was expecting...
FHTEST
Can anyone please help me out with this?
Thanks for your review and am hopeful for a reply.