Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2003
    Posts
    4

    Unanswered: Sybase - query returns truncated values

    Hi Guys,
    I have a query which has html tags hardcoded to it, so that the resultset can be directly used as a html form.
    The query would look something like this

    select "...html opening tags"

    select "<TR> <TD>" + COLUMN1 +
    "</TD> <TD> " + COLUMN2 +
    "</TD> <TD> " + COLUMN3
    from TABLE1

    select "...html closing tags".

    Whats happening here is, each row that is returned is a STRING rather than a normal resultset row. Hence once the length exceeds 255 chars, the rest gets truncated.

    I can add this hrml tags using perl or some other language to prevent this, but before going there i was wondering is there is a way out of this.

    I have tried it using 2 clients, ISQL and WISQL2.

    Both are having the same problem, hence i assume its not a problem with the client, but with sybase ability to return strings more than 255 chars

    IS THERE A WAY AROUND THIS?

    Please advice.

    Regards
    S Premkumar
    Last edited by premkumar_swami; 08-11-04 at 04:13.

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524

    Thumbs up

    Yes:

    Code:
    select "<TR> <TD>" , 
    		  COLUMN1 ,
    		 "</TD> <TD> " , 
    		 COLUMN2 , 
    		 "</TD> <TD> " , 
    		 COLUMN3 
    from TABLE1
    So, you don't need to convert the non-string columns
    F. Celaia
    DBA Sybase/DB2/Oracle/MS-SQL

  3. #3
    Join Date
    Jun 2003
    Posts
    4
    Celaia
    Thats brilliant, i completely overlooked this aspect. Once again.. BRILLIANT. Thanks dude.

    Regards
    S Premkumar

    Quote Originally Posted by fadace
    Yes:

    Code:
    select "<TR> <TD>" , 
    		  COLUMN1 ,
    		 "</TD> <TD> " , 
    		 COLUMN2 , 
    		 "</TD> <TD> " , 
    		 COLUMN3 
    from TABLE1
    So, you don't need to convert the non-string columns

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •