Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2002
    Posts
    6

    Unhappy Unanswered: Sybase Text Fields reading

    Hi,
    I got a temp table that has text field i would to read that text field in my stored proc. I am doing substrings to read the pieces of data from Text field but after 255 i cannot read anymore. Is there way that i can read the text all way to the end piece by piece.
    Thank you.

  2. #2
    Join Date
    Oct 2001
    Posts
    10
    Sorry, I must be having a brain cramp.

    Why can't you just:

    select text_column
    from YOUR_TABLE

    ??

    Frank
    Content Manager Webmasters Resources
    www.serverexpert.com/ Help with servers and the software that they run.

  3. #3
    Join Date
    Feb 2002
    Posts
    6
    Hi Frank,
    I need to select the content of the text field into variable. But i cannot select the entire text into a single variable because the limit is 255 for variables and we cannot declare text as variable.
    Thank you.

  4. #4
    Join Date
    Oct 2001
    Posts
    10
    OK, now I understand. I don't know of any way to get around that in a stored procedure.

    Frank
    Content Manager Webmasters Resources
    www.serverexpert.com/ Help with servers and the software that they run.

  5. #5
    Join Date
    Mar 2001
    Location
    Lexington, KY
    Posts
    606
    What version are you using? With ASE 12.5 you can define parameters up to 16,000 bytes.

    If you are doing some SQL before the stored proc call you can stick the code in a temp table which is readable by the SP, e.g.
    Code:
    INSERT INTO #bob ( textcol ) VALUES( 'asfnksjdfh' )
    
    CREATE PROC sp_gettextfromtemptable
    AS
      DECLARE @bob TEXT
      SELECT @bob = textcol
         FROM #bob
    GO
    Something like that.
    Thanks,

    Matt

  6. #6
    Join Date
    Feb 2002
    Posts
    6
    Hi Matt ,
    Thanks for the response. I am using 11.9.2 which does not allow to do this declaration of text field.
    Thank you.

Posting Permissions

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