Couldn''t replace text

  • Hi,

    I am new to SQL 2005. And I am doing a straigth select from a table.

    The query looks pretty much like this.

    Select * from Table.

    It returns some rows , but not all , and then it gives me the following error.

    An error occurred while executing batch. Error message is: Couldn't replace text

    What does it mean?

    Why am I getting it?

    Thanks 

     

     

  •  

    i think u r sql server is not install properly...bcoz u r querry is absolutely right  by prasad

  • check if the data grid is truncating some part of your resultset.

     

    ------------
    Prakash Sawant

    http://psawant.blogspot.com

  • Hi,

    First of all check how many rows in your table :-

    1) USE THE BELOW MENTIONED QUERY FOR IT :

    Select count(*)  from table

    if you got the output then analyse how many rows are returned to you when you are using the query :

    2)  select * from table.

    Another alternative of it that you can copy all the records into a temp table using query :

    select * into #temp_1 from table

    this query will create a temp table with name #temp_1 and then copy all the records into it.

    Then use the following query :

    Select * from #temp_1

    if it shows all the records to you it means the structure or internal links of your table is broken

    then you can truncate your main table .

    and create a new one form the #temp_1 to load your data.

    if you want any help then i am there in between 6.pm to 11 pm at IST.

    Thanks & Regards

    Amit Gupta..

    MCDBA

  • Hi,

    I have actually tried to select eveything into a temp table. The select into works fine, and if I do a select count(*) there are no problems.

    However if I do a select * on either table , the original OR the temp table I get that error.

    If I do only a partial select its fine. IE. If I select top 1000 * from Table.

    The table contains  a few million rows. So granted it is a lot of information to Select * , but the error message just seems somewhat unrelated to what I'm trying to do.

    Unless somewhere in the background SQL actually replaces some text, and runs into an error. 

    Do you have any idea, why it would try to replace the text?

    Thanks again.

  • How many columns does your table have - what are the data types ?!







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

  • I came across this result in a google search but think the poster is only told to report this to microsoft...it starts off as an out of memory error posting but does deal with the same error as yours' eventually...

    Also - you may want to post this in the 2005 forums - you'll have better luck there!!!







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

  • Hi,

    Thanks for that.

    It definately appears to be what used to show up in SQL 2000 as out of Memory.

    I guess I could ask microsoft about it.

    I know. Somehow I always manage to post in the wrong place, and then only notice afterwards. Is there no way to just move a post to a differnt category?

     

     

  • No - there's no way to move a post...but you could edit it and delete everything and provide a link to the new posting instead...good luck and post the results of your findings when you have this resolved!







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

  • I was getting the same error, so Iopened another management studio session (logged on as the same user etc) and tried the same query and it worked fine. Before, if I tried to return my results in grid format - I got an outofmemory exception - so simply open a new session entirely and retry.

  • Superchick (10/30/2006)


    I am new to SQL 2005. And I am doing a straigth select from a table.

    You're doing select into where?

    There must be type mismatch between source and destination.

    _____________
    Code for TallyGenerator

  • Had the same error In 2005. Moved the query to 2008 and ran again. Error did not recur.

    Mine returned 4.9 million rows, so I have to believe it is some form of "Out Of Memory" error in 2005.

    Hope that helps.

Viewing 12 posts - 1 through 11 (of 11 total)

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