Click here to Skip to main content
15,899,313 members
Home / Discussions / Database
   

Database

 
AnswerRe: Export data in SQL 2008 Pin
Richard Deeming11-Jul-13 10:40
mveRichard Deeming11-Jul-13 10:40 
Is there a carriage-return or line break embedded in the field?

If you can isolate one of the affected rows, try dumping the characters from the affected field:
SQL
DECLARE @FieldValue varchar(100);
SELECT @FieldValue = AffectedField FROM AffectedTable WHERE Key = @AffectedKey;

WITH E1(N) AS
(
    SELECT 1 
    UNION ALL SELECT 1 
    UNION ALL SELECT 1 
    UNION ALL SELECT 1
    UNION ALL SELECT 1 
    UNION ALL SELECT 1
    UNION ALL SELECT 1 
    UNION ALL SELECT 1 
    UNION ALL SELECT 1
    UNION ALL SELECT 1
),
cteNumbers (N) As
(
    SELECT
        ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) 
    FROM 
        E1 a, E1 b -- Cross-join = 100 rows
)
SELECT TOP(LEN(@FieldValue))
    N,
    Ascii(Substring(@FieldValue, N, 1)) As AsciiCode,
    Substring(@FieldValue, N, 1) As Character
FROM
    cteNumbers
ORDER BY
    N
;

You're looking for either a 10 or a 13 in the AsciiCode column.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


Questionbcp command in sql 2008 Pin
vkEE11-Jul-13 6:45
vkEE11-Jul-13 6:45 
AnswerRe: bcp command in sql 2008 Pin
NickPace11-Jul-13 7:10
NickPace11-Jul-13 7:10 
AnswerRe: bcp command in sql 2008 Pin
NickPace11-Jul-13 7:24
NickPace11-Jul-13 7:24 
GeneralRe: bcp command in sql 2008 Pin
vkEE11-Jul-13 8:07
vkEE11-Jul-13 8:07 
GeneralRe: bcp command in sql 2008 Pin
NickPace11-Jul-13 9:23
NickPace11-Jul-13 9:23 
QuestionWhat will be the connection string --- Please read the entire question first Pin
Biplob Singha Shee11-Jul-13 3:04
Biplob Singha Shee11-Jul-13 3:04 
AnswerRe: What will be the connection string --- Please read the entire question first Pin
Eddy Vluggen11-Jul-13 5:02
professionalEddy Vluggen11-Jul-13 5:02 
AnswerRe: What will be the connection string --- Please read the entire question first Pin
jschell11-Jul-13 9:08
jschell11-Jul-13 9:08 
QuestionConnection String of a MySql Database from another computer via LAN Pin
Biplob Singha Shee11-Jul-13 0:53
Biplob Singha Shee11-Jul-13 0:53 
AnswerRe: Connection String of a MySql Database from another computer via LAN Pin
Garth J Lancaster11-Jul-13 1:13
professionalGarth J Lancaster11-Jul-13 1:13 
GeneralRe: Connection String of a MySql Database from another computer via LAN Pin
Biplob Singha Shee11-Jul-13 1:29
Biplob Singha Shee11-Jul-13 1:29 
GeneralRe: Connection String of a MySql Database from another computer via LAN Pin
Garth J Lancaster11-Jul-13 1:44
professionalGarth J Lancaster11-Jul-13 1:44 
GeneralRe: Connection String of a MySql Database from another computer via LAN Pin
Biplob Singha Shee11-Jul-13 1:51
Biplob Singha Shee11-Jul-13 1:51 
GeneralRe: Connection String of a MySql Database from another computer via LAN Pin
Garth J Lancaster11-Jul-13 1:55
professionalGarth J Lancaster11-Jul-13 1:55 
GeneralRe: Connection String of a MySql Database from another computer via LAN Pin
Biplob Singha Shee11-Jul-13 2:01
Biplob Singha Shee11-Jul-13 2:01 
Questiondatabase Pin
Member 1015018110-Jul-13 18:13
Member 1015018110-Jul-13 18:13 
AnswerRe: database Pin
Mycroft Holmes10-Jul-13 18:25
professionalMycroft Holmes10-Jul-13 18:25 
AnswerRe: database Pin
RedDk12-Jul-13 11:40
RedDk12-Jul-13 11:40 
AnswerRe: database Pin
berrymaria16-Jul-13 16:33
berrymaria16-Jul-13 16:33 
QuestionSSDT Install fail Pin
dharmaa.m10-Jul-13 2:41
dharmaa.m10-Jul-13 2:41 
QuestionKeeping Production DB Up To Date Pin
Kevin Marois9-Jul-13 12:55
professionalKevin Marois9-Jul-13 12:55 
AnswerRe: Keeping Production DB Up To Date Pin
Garth J Lancaster9-Jul-13 13:25
professionalGarth J Lancaster9-Jul-13 13:25 
GeneralRe: Keeping Production DB Up To Date Pin
Kevin Marois9-Jul-13 13:32
professionalKevin Marois9-Jul-13 13:32 
AnswerRe: Keeping Production DB Up To Date Pin
Mycroft Holmes9-Jul-13 16:11
professionalMycroft Holmes9-Jul-13 16:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.