insertion of a string

  •  want to insert a string to the database ,it shoulld be like

     this ie,the string should be inserted as two lines.

     i applied chr(10),but it doesnt work out.

  • What do you mean by two lines?

    SQL has no concept of lines it only stores data in rows.

    INSERT INTO [table) (col1) VALUES ('A' + char(13) + CHAR(10) + 'B')

    will insert a single row, it is upto the application presentation to decide how to show the data

    What are you trying to do, can you explain the process, post the ddl, data and expected results.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Illustration of David's response...

    DECLARE @Line1 VARCHAR(25)
    DECLARE @Line2 VARCHAR(25)
    
    SET @Line1 = 'I am a clown. '
    SET @Line2 = 'I make people laugh!'
    
    PRINT @Line1 + char(13) + @Line2
    PRINT @Line1 + @Line2
    
    Results:
    I am a clown. 
    I make people laugh!
    I am a clown. I make people laugh!
    







    **ASCII stupid question, get a stupid ANSI !!!**

  • quoteI am a clown.

    I make people laugh!

    I am a clown. I make people laugh!

    WOW

    that me again sushila

    but your the funny one

    Far away is close at hand in the images of elsewhere.
    Anon.

  • hopefully I'm funny "ha ha" & not funny "peculiar"....

    Not that this is the time or place for it, but David - your sentence should read - "YOU'RE the funny one!"







    **ASCII stupid question, get a stupid ANSI !!!**

  • Not that one again???

  • Yup remi - some things NEVER change...they're the only constants in this world fraught with variables...







    **ASCII stupid question, get a stupid ANSI !!!**

  • That's why I stopped fighting that one .

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply