Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server & have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for

Long Text In Sql Server

i have a table in sql server, i want to insert a long text for a field. that long text like a file's text.please tell me what is the data type for that field. i tired ntext and text data type but i cant insert long text values. reply me if u have answer

View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
How To Edit Long Text Data In SQL Server
Hi Guys,I have editing a SQL Server table field that have long text data. I amupdating some text in this field. How can I update this field insteadof re-write all text. With the Select command its gives me completetext in one line and it hard to read it. Any idea. Thanks in AdvanceAdnan

View Replies !   View Related
Problem With Text Field: Text Input Too Long, Weird Characters

Im a programmer for an university webportal which uses php and msssql.
When an user creates a new entry and his text is too long the entry is cut short and weird characters appear at the end of the entry.

For example:

How can I set the text limit to unlimited?
Could it be something else?
Is there a way of splitting an entry to several text fields automatically?

Thanks in advance for any help you can give me,

View Replies !   View Related
Managing Ntext, Text With A Long Text Data
Hi,I have a problem to insert(update) a long text (more than 64K) intoSQL 2000 (datatype - 'text'). It cuts the data and insert only 64K.MSDN says: "When the ntext, text, and image data values get larger,however, they must be handled on a block-by-block basis. BothTransact-SQL and the database APIs contain functions that allow applications towork with ntext, text, and image data block by block." Could somebodygive me an example how to do this, please.Thank you

View Replies !   View Related
How Long Is 'text'?
How long exactly is the text datatype in non-unicode characters for SQLS7? I guess I need to find out how long my input is and break it up into multiple text fields, but what's the max length?

View Replies !   View Related
Long Text In SQL
I have a challenge and am not very versed with coding this situation. The situation is I am trying to put long text (more that 255 char) in a ntext field in SQL7, but the max char can input is only 255. Anyone can advice on how to put in more that 255 char in a field as well as how to select back the record whice more than 255 char.

Please give advice if you encounter this problem before.


View Replies !   View Related
SQL Long Text
Anyone have same sample on how to put in and retrive long text (more then 255 characters).
Please Comment.

Ray Miao at 7/19/00 8:24:08 AM

You should use readtext and writetext to access text column. By the way, nchar and nvarchar can hold up to 4000 characteres.

Wong at 7/18/00 11:43:15 PM

I have a challenge and am not very versed with coding this situation. The situation is I am trying to put long text (more that 255 char) in a ntext field in SQL7, but the max char can input is only 255. Anyone can advice on how to put in more that 255 char in a field as well as how to select back the record whice more than 255 char.

Please give advice if you encounter this problem before.


View Replies !   View Related
&<Long Text&>
Hi everyone,

I have tranferred my database from Access to SQL. In some cases where there is a very long text in the field of "content" (thats the name of the field) appears the sign <Long Text> while in some other fieldsof the "content" the text appears normally...

I have used ntext 16 as a datatype... How can i dissapear this sign from the there any way?? Thank you

View Replies !   View Related
Long Text Field

have a textbox field that take 2000 characters from user..Then I used a store
procedure to save that user input into database through an insert statement, but
for some reason it just never store the whole string of 2000 characters but only
store some of it (like 100 or something) .. Seems like a data type problem…(I  am using SQL server 2000)


is what I have defined:







View Replies !   View Related
Text Too Long To Be Edited
Hi,I asked this in an MS Access newsgroup, but no one has answered. Since italso applies to SQL Server, maybe someone in here has an answer? I actuallydo have the same problem in both SQL Server 2000 and Access 2000.When I click in certain records in a memo field, I get the error message"text too long to be edited", and I can't get into the record to make anychanges.I tried exporting the record to html, but only part of the memo field isexported.I know that in SQL Server, you can increase the size of the field, but youcan't do that in an Access memo field (that I know of!).I'm thinking that if I could get into the field and lose some of the whitespace, it would help, but I can't get into the field, and can't get the dataout, either!Does anyone know anything about this?Thanks, Jill~

View Replies !   View Related
Split Long Text
Good day,

I have a database table that is populated by bulk insert of a text file. This file is not comma delimetated and there are no line end characters, just one very long string, although the file is fixed length.

As I said I now have this long string in my SQL Server 2005 table. Is there a fast way to split this up into multiple rows?

Say for instance I have a string of 100 characters and each row would be made up of 10 characters. Is there a easy way to split this into the 10 rows or 10 characters using just a SQL statement?

Please can someone help.

View Replies !   View Related
&<Long Text&> Entry
Hi all,

Newbie here, just wanted to get that out of the way first
and foremost.

Im trying to set up a DB in SQL 2000 that allows me to enter
lots of text into a column.

I read one site where it said to use the NTText datatype with a length
of 16. I did that, but everytime I enter alot of text into that column
I get <Long Text> and I dont know how to output that or even
read it.

Do any of you guys know how to either:

1. get the text out of the <long text> or
2. a better way to store that much data.

Thank you in advance!!!


View Replies !   View Related
Copying Long Text
I have a table say w/ 2 fields


I have data in one of the companies letter fields and want the same thing in every other company. But I'm getting errors about subqueries and aggregates when using long text fields..

So can someone help me write a statement to update all StdLetter columns w/ the letter that's already in the StdLetter column of CoNum = 1?


View Replies !   View Related
Long Text Gets Cut Off When Saved
I was trying to save a long text from application to "text" data type in sql database but it gets cut off at few hundred characters.

Does anyone know what the problem is?

Thanks for any help.

View Replies !   View Related
Lost &<Long Text&> After Copying. Help~~

I copy the some record lines in Table view and paster them at the end of the table. but all <Long Text> fields were blank! And I had deleted those lines I copied. How can I recover those Lost <Long Text> data?


View Replies !   View Related
ASP, SQL, Long Text Data Problems...
I have an ASP page that will take form info that a user has entered,then save it into SQL server, and retrive and display the info onanother page. My problem is with long text data (10,000 bytes ormore). It appears to save the long text data, as in it gives noerrors... but it does not save it. In the SQL table, the field isdefined as ntext... So why won't it save?Thanks in advance,adam

View Replies !   View Related
Xp_sendmail With Long Text Messages
Hi everybody,i try to send messages longer than 7990 characters from a text fieldin SSQL2000. Unfortunatly the messages get cut off after 7990character.I did everything which is described in BOL (see below). It does notsolve the problem. Upgraded to newest Outlook Client and tried to sendas an attachment also. No success though.Does anybody have a hint before i contact Microsoft.RegardsYorn Ziesche[color=blue]>E. Send messages longer than 7,990 characters[/color]This example shows how to send a message longer than 7,990 characters.Because message is limited to the length of a varchar (less rowoverhead, asare all stored procedure parameters), this example writes the longmessageinto a global temporary table consisting of a single text column. Thecontents of this temporary table are then sent in mail using the@queryparameter.CREATE TABLE ##texttab (c1 text)INSERT ##texttab values ('Put your long message here.')DECLARE @cmd varchar(56)SET @cmd = 'SELECT c1 FROM ##texttab'EXEC master.dbo.xp_sendmail 'robertk',@query = @cmd, @no_header= 'TRUE'DROP TABLE ##texttab

View Replies !   View Related
Long Text Column Not Accepting
Hi DBAs,
I am very new in SQL server. I created a table where one column is varchar(8000). But when I am trying to insert value from enterprise manager this column cann't accept a long text value. I counted that its' capacity is 1012 charecters. I have tried a lot but don't know how to solve this. I really need help from you. Pls help.

Thanks in advance

Rajat Raychaudhuri

View Replies !   View Related
Parsing Long Text Blobs
Hey Guys I knwo this may sound impossible but lets say I have a number of fields one of which is a Long blob or long text

is there a way to have MYSQL search the blobs for keywords and then to extract them to other fields?
basically what I am asking is it possible to parse a long text blob for keywords and then grab data before or after those keywords?/

anyone know a way???

View Replies !   View Related
Data Type For MP3&#39;s And Long Text
I would like to know as to what data type is the best if I want to store MP3's and large amount of text in a SQL server.
Please let me know about the data type for both the tasks.
The table for MP3 is different than the table for large text (eg . saving somebody's resume)
Please do let me know.

Thank you,


View Replies !   View Related
How To Edit &<long Text&> Field
I know that similar items have been posted before but I have not found a solution to my issue by reading them.

I have a text field which holds amendment details and it cannot be updated through QA. I have 50 records which I have had to manually update through Enterprise Manager. I have been able to edit the amendment details field of 48 of these records. However for 2 records the amendment details field contains <long text> and as we all know, there does not seem to be an easy way to edit these.
Before I give up for good, does anyone have any suggestions?
Help much appreciated.

View Replies !   View Related
&<Long Text&> Doesn't Show Up
I have a question that has a co-worker and myself confused. We are using the SQL Server Enterprise Manager. When I select return all rows in my tables, any content that is too long will appear as <Long Text> on my co-workers machine, but the column is blank on my machine. Is there a property or configuration that enables/disables <Long Text>? I am confused as to why it appears on other machines, but not mine.

Your help is appreciated.

Live Life.

View Replies !   View Related
Extremely Long Lines Of Text
I have a dtsx package that works fine with one exception.  When I open the dtsx package in BI, it gives me the following message:

Document contains one or more extremely long lines of text.  These lines will cause the editor to respond slowly when you open the file.  Do you still want to open the file?

When I respond yes, the package opens and I can edit or execute with no problem.  Still, I want to understand what could cause this message to occur and, more importantly, how I can get rid of the message.  When I try to simply execute the package I still get the same error and it seems this will be a problem for trying to run the package from SQL Server agent. 

It seems likely to me that this message refers to the dtsx file (in xml format) itself.  Does that make any sense?


View Replies !   View Related
Get Long Text From Excel File

 In my Excel file I have one column "Summary" which contains large amounts of data. In ExcelSource I changed the Output Column: Summary datatype to Unicode[DT_Ntext], but I am not able to chnage the External column datatype from [DT_WSTR] to [DT_NTEXT].
 Initilly it is string so changed to unicode. Still I am getting this error:
"Failed to retrieve long data for column " Summary".
I tried the BlobTempStoragePath to other directory? Still not working.
How to solve this error?
Thanks in advance

View Replies !   View Related
Too Long Text And Sorting Does Not Work.
Hello :
If the title of a column is very long and the sorting is active, the posting is not good.

The image of sorting is not posted(shown


You met this probleme.

Thenk you.


View Replies !   View Related
Find People Names In Long Text
Thank you for taking the time to read this, I need all the advise and help I can get on this ... so please post anything you think would work ... A little confused I am:
Have a database table called "people" with "person name" and "ID" field. My ASP.NET application mainly stores articles in article table. An article's Article text mentions various people's names in different combinations (e.g. John, Smith, John Smith, Smith John, etc)
Is there any way, I could compare the article text stored in article table with people table and get the people from people table along with their ID's who have been mentioned in that article? ... so in an article "i love john smith ... and i think Mr smith has always been helpful", I get John Smith back...
Not too sure being honest, what is the best way of implementing this, looking for the most efficient way, probably using XML? SQL Query or may be ASP.NET's code behind?
Thanks once again for taking the time.

View Replies !   View Related
Best Practice For Storing Long Text Fields
As we all know, there is a 8060 bytes size limit on SQL Server rows. Ihave a table which requires a number of text fields (5 or 6). Each ofthese text fields should support a max of 4000 characters. We currentlystore the data in varchar columns, which worked fine untill ourappetite for text fields increased to the current requirement of 5, 6fields of 4000 characters size. I am given to review a design, whichesentially suggests moving the text columns to a separate TextFieldstable. The TextFields table will have two columns - a unique referenceand a VARCHAR (4000) column, thus allowing us to crossreference withthe original record. My first impresion is that I'd rather use the SQLServer 'text' DB type instead, which would allow me the samefunctionality with much less effort and possibly better performance.Can anyone advise on advantages and disadvantages of the two optionsand what the best practice in this case would be.Any advise will be well appreciated.Tzanko

View Replies !   View Related
Very Long Rich Text Information - Datatype?
Sorry if this seems a little basic, but I'm putting together an applicationwhere large amounts of text will be required in a single record - way morethan 8000 characters.What's the normal way of coping with this? Splitting into multiple recordseach with a max of 8000 chars?Thanks,JC

View Replies !   View Related
Any Way To View &&<Long Text&&> In Data Viewer
I was wondering if there is any way to view <Long Text> in the data viewer?  I have a text data type, and when using the data viewer it just says "<Long Text>".  That contains the data I actually want to watch... is there any way to get this?

View Replies !   View Related
Import Long Text From Excel Into Table

Hi everyone,
I've got an excel file that I want to import into a database table.
The longest text in a cell is 385 characters.
I've made the fields in the table nvarchar(1024).
I created a data flow task for the import.
When I run this task, I get the following error:
[Excel Source [1]] Error: There was an error with output column "Line Text" (52) on output "Excel Source Output" (9). The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".
[Excel Source [1]] Error: The "output column "Line Text" (52)" failed because truncation occurred, and the truncation row disposition on "output column "Line Text" (52)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.

is it possible that there is a restriction on the length of the text ?

View Replies !   View Related
In SQL 2000 In TEXT Data Type How Much Long Is The Limit?
Hai Every one
      i am facing a werid problem it is related to storing a long text data in SQL 2000 the text data is some thing like the following
in short it is really long so i opted to go with TEXT data type as it states that it can store more than 8 kb but when i try to insert this data it gives me error stating that Text data type cannot be of length more than 128...........?
What  am i doing wrong........if Text is not the proper datatype to store such a data then can anyone suggest some thing better...............
Thanks in advance

View Replies !   View Related
<Long Text> Appears From Access Database Import
When I import data from MS Access databases, some fields appear as
"<Long Text>" in SQL. I cannot edit these fields in SQL. I have to export
the table to Access, update the field, and then import again.

There's got to be an easier way. What am I missing here?

The field in Access is of type 'memo'.

View Replies !   View Related
Can You Parse Out A Text String &> 8000 Chars Long??
Any way to parse out a text value (not varChar, using text data type) that is > than 8000 characters long? I'm looping through 1 big string passed to the DB that is pipe delimited, but I find myself needing the substring function to keep track of which segment I'm acting on (after an update, I then need to take that segment and remove it from the string)...but the subString function won't take anything larger than 8000 chars.

Say I have this string that is text data type...


..and so on, surpassing 8000 char length, how could you parse it out using the pipes as the delimter, then do an Update using that segment? Afterward, return to that string and find the next segment, then use it, and so on (in a loop). I tried using an update to set the string = replace(string, segmentJustUsed, '') to "erase" it, but replace can't take text as the datatype. Any help? Hope this isn't to confusing.

View Replies !   View Related
Error - Document Contains One Or More Extremely Long Lines Of Text

I've created a dataset with 27 measures and 20 query parameters.  When attempting to load the report containing this dataset I'm shown the message;

'Document contains one or more extremely long lines of text.  These lines will cause the editor to respond slowly when you open the file.  Do you still want to open the file.'

If I do open the file it does indeed respond very slowly or even hangs.

I can manually format the XML code but amending the code in any way (i.e. using the layout designer to move a chart)  removes my formatting and re-introduces the problem.

Are these an unreasonable amount of measures / parameters?

VS2005 v8.0.507
MSSQL 2005 9.00.1399.06 Build 3790 SP2
Windows Server 2003 SP2

Many thanks.

View Replies !   View Related
Forcing A Line Break In Long Text Field.
I have to output as one filed name, mailing address, and phone of each company that we do business with.
the out put must look as follows:
Company Name
Store number: #####
Street Address 1
Street Address 2
City, State    Zip + 4
Phone: (###) ###-####

Each piece of data is a single field and will have to be concatenated into one.
How do I force the line breaks where I need them?

Also each piece of data will be compared to a €œsource€? for validity and I will need to mare the individual data pieces red where €œwrong€?. Like so:
VALID                                                    MY DATA
Company Name                                      Company Name   
Store number: #####                               Store number: #####
Street Address 1                                     Street Address 1
Street Address 2                                     Street Address 2
City, State    Zip + 4                                City, State    Zip + 4
Phone: (###) ###-####                             Phone: (###) ###-####

Any ideas on how to do this? I have used IIF for conditional formating of field colors in the past, but my expierence is that it changes the WHOLE display field not just piece of data the IIF is wrapped around.

View Replies !   View Related
Estimate On How Long It Might Take To Full-text Index A Table With 21,000 Rows?
i need to full-text index a table so that i can easily search the text fields of that table.. the table has about 21,000 rows, and i was wondering how long it might take to full-text index it?


View Replies !   View Related
Do Not Display The Result Of My Long Text String, Approx About 400 Characters
I have the following problem. My SQL Query that i wrote works but the result that is displayed in Query analyzer cuts most of my long text that I want in my result. The long text string is approx about 400 characters and the type is varchar of the field. Any ideas??

, '1', COMPONENTID,'ENG'+SPACE(2),'#'+SPACE(254),'#'+SPAC E(254),'#'+SPACE(254),'#'+SPACE(99),externalid,
'Desc1' = CASE
WHEN SUBSTRING(externalid,1,2) = 'MF'
THEN 'Full machine warranty : parts, labour, mileage and others covered at warranty rates applicable at the time of repair. '
WHEN SUBSTRING(externalid,1,2) = 'MP'
THEN 'Full machine warranty, parts only : parts covered at warranty rates applicable at the time of repair. '
WHEN SUBSTRING(externalid,1,2) = 'PF'
THEN 'Power line warranty : parts, labour, mileage and others covered at warranty rates applicable at the time of repair. '
WHEN SUBSTRING(externalid,1,2) = 'PP'
THEN 'Power line warranty, parts only : parts are covered at warranty rates applicable at the time of repair. '
WHEN SUBSTRING(externalid,LEN(externalid)- 3,4) = '2018'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 18 month or 2000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '3024'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 24 month or 3000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '4030'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 30 month or 4000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '5036'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 36 month or 5000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '6042'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 42 month or 6000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '8054'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 54 month or 8000 HRS, whichever comes first. '
WHEN SUBSTRING(externalid,LEN(externalid)-3,4) = '1074'
THEN 'Flexible warranty starts after the standard warranty period has expired and is covered up to 74 month or 10000 HRS, whichever comes first. '
+ 'Flexible warranty is handled according to the procedures described in ESPPM 3-10.'

WHEN prodclassid IN ('P1','P11','P8','P9')
THEN ' (mileage limited to 300 km)'
WHEN prodclassid IN ('P7')
THEN ' (mileage limited to 200 km)'
SPACE(5000 - LEN('Desc1'))

View Replies !   View Related
Report Layout Issue - Textboxes, Long Text And Page Breaks
I have a report based on one record.
There are several fields that can be extremely long (ntext).
The report itself basically has a heading next to a textbox so that the output looks like
heading text                              |fields to display
5. Client Name                           Joe Client
6. Business          Background     Background Text Bla Bla Bla
                        Family History    Family History Text Bla Bla Bla
7. Question bla bla bla                 Yes
                                                  Explanation bla bla bla
For each section, I used a ListBox with textboxes inside.
With small text blocks to display all is good.
During the initial screen render, all looks excellent. When I switch to the page view or print the report, the large text blocks mess things up.
Just after the end of section 5, I'll see section 6. heading text, then the extremely long bla bla bla is on the next page.
At the end of section 6. I'll see the section 7. heading text with the extremely long bla bla bla on the following page. This happens for all large text blocks.
The simple observation is to turn off the 'Keep Together' property of the text box. But there isn't one. All I want is the textbox contents to flow from page to page.
I hope my explanation is acceptable, if you need more let me know. I really do appreciate any guidance or suggestions.

View Replies !   View Related
Text Doesn't Support Rtrim,ltrim Etc Functions...which Is Other Better Way To Save A Long String

I sent a long string of ID from front end to my stored procedure...till now I was using varchar(8000)...but if the string crossess that limit it is breaking.
If I try to use text datatype..It doesn't support rtrim, stuff functions etc...
So could any one suggest me a best way to save a long string without any restriction of size...
My front end is C#.Net and Back End is SQL SERVER 2000
Thanks in advance

View Replies !   View Related
Long Text In &"Default Value Or Binding&"
Hey guys, how can I use a long text as default value in my database (column properties)?I tried to paste my 10 row text into the field but it will only paste the first row as default value.any ideas??

View Replies !   View Related
I Need To Find Out How Long My SQL Server Has Been Up.
I need to find out how long my SQL Server has been running and I believe that there is a way of obtaining this info by querying a system table (or executing a procedure).

Does anyone know about this?


View Replies !   View Related
SQL Server 2000 Full Text Search (extract Pieces Of Text)
Hello everyone !
I want to perform Full Text Search with SQL Server 2000. My documents (.doc, .xls, .txt, .pdf) are stored in a SQL Server field which is binary (the type of the column is image).
I would like to know, how you can extract pieces of text from the documents.
I have a ASPX page with codebehind in C# making the search in a table in SQL server that is full text indexed.
I make a search looking for the word "peace", than SQL server will take care about the search and return it to me the rows that match with that. But also I'd like to extract the 50 characters before and after where sql server found the word "peace" to show in the result page.
Does anyone has any idea how to work around it ?
 Best regards.

View Replies !   View Related
SQL Server Takes Too Long To Run A Query
Hi there,I've a table with 18 millions of recordes shaped like this :Code nvarchar(80) , State int , school int , class int , Term nvarchar(80)The following query takes too long to run ( more than 2 hours )select State , school , class , term , count (term) as freqGroup by state , school , class , termHow may I speed up the query?My Pc is PIV (3.6 GHz) Intell , Win2003 Server , 512 MB of RAM, 80 GB of HDRegards,M.Mansoorizadeh

View Replies !   View Related
Sql Server Takes Too Long To Startup
My sql freezes my machine every now and then as if its processing something in the background. From task manager it starts from 3864K on Mem usage and goes up to 363 632K. How can l fix that? And when l switch on my machine the sql server takes o long time to start whats the problem l'm running sql2000 on xp professional. l've got an Intel Pentium III processor,846MGz and 512mb.

View Replies !   View Related
SYBASE, I Know It Is Not SQL Server But This Is A Long Shot
To anyone who knows how to use sybase. One of our guys has put in a sybase system and not told the rest of us about it and know their is a problem and it is in my lap. Surprise, surprise.
Just asking does antyone know how to rebuild a sybase database after it has been recovered from previous data and is now twice the size that it was origonally. Please help if any one can>

Many thanks to any one who can help.

View Replies !   View Related
SQL Server - Checkpoints - Long Duration
We are running SQL 7.0 on a new HP four processor server with 4 gig memory and 108 gig raid 5 disk. The database is on one controller and log files, etc. are on another controller. When the database takes a checkpoint, about half the time it takes anywhere from six minutes to fifteen minutes. Obviously, user response is slow during this time.

We are running mostly default values on tuning related configuration settings: Recovery interval is set to 0; write-back cache is currently disabled; we have reduced the memory available to SQL to 2 gig; increased the max async io from 32 to 64; we have plenty processor cycles available and are getting NO disk queuing.

We are getting no help from Microsoft on this problem; any ideas.

View Replies !   View Related
Probem In Executing A Long Dynamic MDX From SQL Server
Hi ,What i exacly want to do is1. Connect to OLAP server from my Sql server using following querystring'SELECT a.* FROMOpenRowset(''MSOLAP'',''DATASOURCE="RAPID-CHRISTUS"; InitialCatalog="MRS";2. I want to execute my dynamically created MDX query . This query canbe greater than 8000 varchar limit.When my query length exceeds 8000 length i break it up into 2 parts..Here I have broken my query into 2 parts@mdx1 and @mdx2Now i execute the entire statement asexec('SELECT a.* FROMOpenRowset(''MSOLAP'',''DATASOURCE="RAPID-CHRISTUS"; InitialCatalog="MRS";'',' + @mdx1 + mdx2 ') as ' )Still error comes that :Unclosed quotation mark before the character string 'WITH MEMBER ..('With member' is the starting statement of my MDX query)Is there any other way to connect to OLAP server and execute an MDXstatement with a Length greater than 8000 charsTIA

View Replies !   View Related
MS Access && MS SQL Server: Long Time Answers
I use MS ACCESS and tables linked to MS SQL SERVER tables.
There are indexes defined (they are visible in MS ACCESS too).
Sometimes DLOOKUP functions are taking long time.

View Replies !   View Related
SQL Server Stored Procedure Best Practices? - Long
I'm an experienced SQL Server and .NET developer, but I wanted to expand the way I look at things and see how other developers approach the situation I'm going to outline in this post. I'm going to be engineering a large, new project soon and I want to examine how I approach this and see if there is a better way.

I work in a small development group with two developers (myself and another). We pretty much wear all the design, testing ,and development hats during the course of a system's development. I had a discussion today with the other developer about creation of stored procedures.

I like to create small specific stored procedures for whatever I'm doing. I will usually have at least 4 stored procedures for each table; Insert, Delete, Update, and Select. Frequently I'll have more Select procedures for special cases. I do this for several reason. One I can get Visual Studio to generate the basic procedures for me and utilize them in a typed dataset. Secondly I can keep all my SQL code server side, and in small maintainable chunks. It is also fairly obvious what my stored procedures do from the name. The main drawback is that the list of stored procedures gets huge.

The developer I work with likes to create a single stored procedure for Insert, Update, and Deletes. Based on the passed primary key, the procedure determines what it should do. For example:

Code Snippet

CREATE PROCEDURE udp_users_processing
@key int output,
@name varchar(200),
@status int
IF IsNull(@key,0)=0
INSERT INTO ut_users(key, name, status) VALUES (@key, @name, @status)
IF KEY > 0
UPDATE ut_users SET key = @key, name = @name, status = @status
DELETE FROM ut_users WHERE key = @key
This has the advantage of being compact, but it has issues with VS.NET and designer support. Loss of designer support isn't a huge problem, but it can be handy to have. I'm also not certain how this approach would work when using typed dataset and the table adapter to do updates.

What is YOUR opinion? How would YOU approach this in your situations? Are there other alternatives that might work just as well?

View Replies !   View Related
Select Statement In Sql Server 2000 Is Taking Too Long??
Hi All,I am facing problem in MS SQL Server 2000. It is behaving slow forselect statements. It is even slower than MS ACCESS. For example, if iuse"Select count(*) from tbl;". i get the results after long time ifthere is more than 100k rows. What might be the possible reasons forthis??ThanksHoque

View Replies !   View Related
SQL Server 7.0 Index Rebuilds - Long Running Query
I have a long running read only query. When I rebuild the indexes using sqlmaint.exe setting the index free space = 40% the query execution time reduces to seconds.

If I rebuild the indexes using 10-30% free space the query continues to run for several minutes.

This is opposite what all the manuals on index tuning say. All page splits should be cleaned up after the rebuild no matter what the free space is

View Replies !   View Related
SQL Server/ Text Fields - Cannot Add Free Text
I have a data table in my project that has a "text" (not varchar) field in it.  I am trying to load this field with little paragraphs of text for showing on my pages. How do I get the free text loaded into the table?  The database explorer and all the data grid controls cut the text off at one line.  There doesn't seem to be any way to get multiline text into this table.  

View Replies !   View Related

Copyright © 2005-08, All rights reserved