January 12, 2010 at 8:17 am
I have written a query na d add to take out the CRLF's but now it stops and will not export the rest of the query to excel.
REPLACE(RTRIM(dbo.Table Name.Column),char(13)+ Char(10),'') AS 'Column1',
RTRIM(dbo.Table Name.Column) AS 'Column2'
Can anyone tell me why it is not exporting the next row?
January 12, 2010 at 10:31 am
SELECT DISTINCT
dbo.MyTable.MyColumn AS 'Column1',
RTRIM(dbo.MyTable.MyColumn ) AS 'Column2',
RTRIM(dbo.MyTable.MyColumn ) AS Column3',
Replace(Rtrim(Ltrim(Replace(replace(dbo.MyTable.MyColumn , Char(13),''),Char(10),''))),',','') AS 'Column4',
--REPLACE(RTRIM(dbo.MyTable.MyColumn ), Char(13)+ Char(10),'') AS 'Column4',
RTRIM(dbo.MyTable.MyColumn ) AS 'Column5',
RTRIM(dbo.MyTable.MyColumn ) AS 'Column6',
dbo.MyTable.MyColumn AS 'Column7',
dbo.MyTable.MyColumn AS Column8',
ISNULL (dbo.MyTable.MyColumn ,'') AS 'Column9',
ISNULL (dbo.MyTable.MyColumn ,'') AS 'Column10',
dbo.MyTable.MyColumn AS 'Column11',
dbo.MyTable.MyColumn AS 'Column12',
dbo.MyTable.MyColumn AS 'Column13',
dbo.MyTable.MyColumn AS 'Column14',
dbo.MyTable.MyColumn AS 'Column15',
dbo.MyTable.MyColumn AS 'Column16',
dbo.MyTable.MyColumn AS 'Column17'
FROM dbo.MyTable(NOLOCK) INNER JOIN
dbo.MyTable(NOLOCK) ON
dbo.MyTable.MyColumn = dbo.MyTable.MyColumn LEFT OUTER JOIN
dbo.MyTable(NOLOCK) ON
dbo.MyTable.MyColumn = dbo.MyTable.MyColumn LEFT OUTER JOIN
dbo.MyTable(NOLOCK) ON
dbo.MyTable.MyColumn = dbo.MyTable.MyColumn LEFT OUTER JOIN
dbo.MyTable(NOLOCK) ON
dbo.MyTable.MyColumn = dbo.MyTable.MyColumn LEFT OUTER JOIN
dbo.MyTable(NOLOCK) ON
dbo.MyTable.MyColumn = dbo.MyTable.MyColumn
LEFT JOIN
dbo.MyTable(NOLOCK) ON
dbo.MyTable.MyColumn = dbo.MyTable.MyColumn
Where dbo.MyTable.MyColumn in (13,54,92,111,61,60)
Does this help in finding my answer?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply