November 8, 2005 at 5:32 am
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.
November 8, 2005 at 7:08 am
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.
November 8, 2005 at 11:35 am
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 !!!**
November 9, 2005 at 2:29 am
![]() | I 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.
November 9, 2005 at 5:44 am
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 !!!**
November 9, 2005 at 9:12 am
Not that one again???
November 9, 2005 at 9:28 am
Yup remi - some things NEVER change...they're the only constants in this world fraught with variables...
**ASCII stupid question, get a stupid ANSI !!!**
November 9, 2005 at 12:35 pm
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