Double Space Replaced With Single Space By Dbms ??!
Jul 20, 2005
This is driving me bananas. Can't find any info on this anywhere....
SQL 2000 seems to replace double space with a single space when I set
a varchar field to " " (2spaces), it only stores " " (1space). Why
on earth would microsoft do this? If I save 2 spaces - I WANT TO SEE
2 SPACES!!!!
Can anyone help? Is this a database setting? Is this due to using
varchar?
Any help appreciated.
Colin Hale
View 2 Replies
ADVERTISEMENT
Feb 23, 2007
I am generating a Report from Sql Data Source in Sql Server 2005 and viewing the Report in Report viewer control of Visual Studio 2005.
The data in the Data Source contains string with multiple spaces (for example €œ Test String €œ) but when they get rendered in Report viewer control, multiple spaces gets converted to single space €? Test String €œ.
I tried following solutions
1) Replacing spaces with €œ €?
2) Inserting <pre> tag before the string and </pre> tag after the string (Also tried <Pre> instead of <pre>)
But in all the cases result is same. The Report Viewer control is showing €œ €? instead of space and €œ<Pre>€? tag instead of preserving spaces.
Please provide me a solution so that spaces can be preserved in Report Viewer.
View 1 Replies
View Related
Nov 14, 2006
How do we suppress multiple spaces to a single space in T-SQL
E.G.
Field: FullName
e.g.
WOMENS HEALTH RIVER VALLEY
JOHN FAMILY MED GROUP
HERSH STWEART P.
PARK HEIGHTS MEDICAL CENTER
KOPP WHITEFIELD E
The o/p wanted is
HERSH STWEART P.
Thank you.
View 3 Replies
View Related
May 14, 2015
we have a value in a column with double space between characters like" abcd  efgh", when I do the preview of the report I see the value as it is with double space; but when I deploy the report on to the reporting server, I just see only single space between the characters. whys is it eliminating one space when it is deployed on the reporting server? how can I get the same value with 2 spaces?
View 2 Replies
View Related
Nov 14, 2007
Hi,
I am trying to do this:
UPDATE Users SET uniqueurl = replaceAllEmptySpacesInUniqueURL('uniqueurl')
What would be the syntax.
Any help appreciated.
Thanks
View 1 Replies
View Related
Nov 26, 2015
I am using the below script to get space alerts  and now i am interested in sending alerts  if for any drive space available is Less than 10% or 15%.. how to convert beelow code to find in %Â
Declare @Drives Varchar(20)
DECLARE @Spaces Varchar(50)
DECLARE @availableSpace FLOAT
DECLARE @alertMessage Varchar(4000)
DECLARE @RecipientsList  VARCHAR(4000);
CREATE TABLE #tbldiskSpace
[Code] ....
View 3 Replies
View Related
Mar 2, 2005
Hi.. I was doing a good maintenance on my DB and my trans log LDF keep growing until 30GB but my DB data file MDF is only 2GB. I found the two following method to reduce my log size.
Method 1: I used veritas to backup log file with truncate
Method 2: I used the shrink database option in Enterprises manager to shrink it (file chosen=log , use default option)
After doing that, I found my LDF log file is still about the same size=27GB but when I see clearly, from the shrink database windows, the log spaced used reduced to only 100MB, the allocation log space is still 27GB. Why? How to make the LDF smaller to be the around the same size as the space used 100MB?
View 1 Replies
View Related
Feb 1, 2008
How do I change a tab (char(9)), newline char (char(10) ) or carriage return (char(13)) in my string into a single space character? This is when I select from a table, the value should have any linefeed or tab converted to space.
Thanks in advance..
View 1 Replies
View Related
Dec 5, 2001
Hello,
Somebody know how to reduce the space allocated for the transaction log space for my SQL_DB ?
3700 MB allocated but only 100 MB used and 3600 MB are free !
Transaction log properties :
Automatically grow file are filled
file growth by percent = 5%
maximum file size - restrict filegrowth = 3700 MB (we can't reduce it !)
Thank you for your precious help !
Khaix from Brussel.
View 1 Replies
View Related
May 21, 2008
I have records where there are multiple spaces between items of text. I would like to strip out all the excess spaces characters. To that end I have written to separate functions (both are listed below) neither of which I would imagine will be particularly efficient. The first uses an int table and the second a while loop. I am presently ignoring the leading and trailing space issue as this can easily be recitfied with LTRIM and RTRIM. However, I would be keen to know if there is a better way of achieving a similar result.
CREATE FUNCTION dbo.StripAdditionalSpaces (@Input varchar(1000))
RETURNS varchar(1000)
AS
BEGIN
DECLARE @Changed int, @Output varchar(1000)
SELECT @Output = ''
DECLARE @String TABLE ([Output] varchar(1000))
INSERT INTO @String ([Output]) VALUES (@Input)
SELECT @Output = @Output + SUBSTRING([Output], i1.Position, 1)
FROM @String
LEFT JOIN dbo.Ints i1
ON SUBSTRING([Output], i1.Position, 1) <> ' '
or ISNULL(SUBSTRING([Output], i1.Position - 1, 1), '') <> ' '
RETURN @Output
END
GO
CREATE FUNCTION dbo.StripAdditionalSpaces2 (@Input varchar(1000))
RETURNS varchar(1000)
AS
BEGIN
DECLARE @Output varchar(1000)
SELECT @Output = @Input
WHILE @Output LIKE '% %'
BEGIN
SELECT @Output = REPLACE(@Output, ' ' , ' ')
END
RETURN @Output
END
GO
View 12 Replies
View Related
Nov 24, 2000
I made some copy of table and I have this error but on my hard disk i have 4 gig of empty space.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate space for object 'Backup_Date_11_24_00_Time_9_08_34_AM' in database 'LogActiviteIntramedia' because the 'PRIMARY' filegroup is full.
/Intranet_API/Forms/videTableLog.asp, line 16
My question is how can I increase the space of primary filegroup?
Thanks and have a good friday
View 2 Replies
View Related
Aug 22, 2007
I have the following:
-----------------
WHILE PATINDEX('%,%',@Columns)<> 0 BEGIN
SELECT @Separator_position = PATINDEX('%,%',@Columns)
SELECT @array_Value = LEFT(@Columns, @separator_position - 1)
SET @FieldTypeID = (SELECT FieldTypeID FROM [Form].[Fields] WHERE FieldID = (CAST(@array_Value AS INT)))
SET @FieldName = (SELECT [Name] FROM [Form].[Fields] WHERE FieldID = @array_Value)
print 'arry value' + CONVERT(VarChar(500), @array_value)
print 'FieldTypeID: ' + CONVERT(VARCHAR(500), @FieldTypeID)
PRINT 'FieldName: ' + @FieldName
BEGIN
IF @FieldTypeID = 1 OR @FieldTypeID = 2 OR @FieldTypeID = 3 OR @FieldTypeID = 9 OR @FieldTypeID = 10 OR @FieldTypeID = 7
BEGIN
SET @InnerItemSelect = ' (SELECT ISNULL(CONVERT(VARCHAR(MAX),[Value]),'''') FROM [Item].[ItemDetailFieldRecords] IDFR WHERE IDFR.ItemDetailID = ID.ItemDetailID AND IDFR.FieldID = ' + @array_Value + ') AS ''' + @FieldName + ''' '
SET @InnerTaskSelect = ' (SELECT ISNULL(CONVERT(VARCHAR(MAX),[Value]),'''') FROM [Item].[TaskFieldRecords] TFR WHERE TFR.TaskID = T.TaskID AND TFR.FieldID = ' + @array_Value + ') AS ''' + @FieldName + ''' '
END
ELSE IF @FieldTypeID = 4 OR @FieldTypeID = 8 --DropDownList/RadioButtonlist
BEGIN
SET @InnerItemSelect = ' (SELECT [Value] FROM [Form].[FieldListValues] FFLV INNER JOIN [Item].[ItemDetailFieldListRecords] IDFLR ON FFLV.FieldListValueID = IDFLR.FieldListValueID WHERE IDFLR.ItemDetailID = ID.ItemDetailID AND FFLV.FIeldID = ' + @array_value + ') AS ''' + @FieldName + ''' '
SET @InnerTaskSelect = ' (SELECT [Value] FROM [Form].[FieldListValues] FFLV INNER JOIN [Item].[TaskFieldListRecords] TFLR ON FFLV.FieldListValueID = TFLR.FieldListValueID WHERE TFLR.TaskID = T.TaskID AND FFLV.FIeldID = ' + @array_value + ') AS ''' + @FieldName + ''' '
END
ELSE IF @FieldTypeiD = 5 --Cascading
BEGIN
SET @InnerItemSelect = ' (SELECT [FCV].[Value] FROM [Form].[FieldCascadingValues] FCV INNER JOIN [Form].[FieldCascadingLookUpTables] LT ON FCV.FIeldCascadingLookupTableID = LT.FieldCascadingLookupTableID INNER JOIN [Item].[ItemDetailFieldCascadingRecords] IDFCR ON IDFCR.FieldCascadingValueID = FCV.FieldCascadingValueID WHERE IDFCR.ItemDetailID = ID.ItemDetailID AND LT.FieldID = ' + @array_value + ') AS ''' + @FieldName + ''' '
SET @InnerTaskSelect = ' (SELECT [FCV].[Value] FROM [Form].[FieldCascadingValues] FCV INNER JOIN [Form].[FieldCascadingLookUpTables] LT ON FCV.FIeldCascadingLookupTableID = LT.FieldCascadingLookupTableID INNER JOIN [Item].[TaskFieldCascadingRecords] TFCR ON TFCR.FieldCascadingValueID = FCV.FieldCascadingValueID WHERE TFCR.TaskID = T.TaskID AND LT.FieldID = ' + @array_value + ') AS ''' + @FieldName + ''' '
END
ELSE IF @FieldTypeiD = 6 --ListBox
BEGIN
SET @InnerItemSelect = ' (SELECT i.[CSV] FROM @ItemDetailLV i WHERE i.ID = ID.ItemDetailID AND i.FieldID = ' + @array_value + ') AS ''' + @FieldName + ''' '
SET @InnerTaskSelect = ' (SELECT it.[CSV] FROM @TaskLV it WHERE it.ID = T.TaskID AND it.FieldID = ' + @array_value + ') AS ''' + @FieldName + ''' '
END
ELSE IF @FieldTypeID = 11 --Users
BEGIN
SET @InnerItemSelect = ' (SELECT SU.[UserID] FROM [Security].[Users] SU INNER JOIN [Item].[ItemDetailUserRecords] IDUR ON SU.UserID = IDUR.UserID WHERE IDUR.ItemDetailID = ID.ItemDetailID AND IDUR.FieldID = ' + @array_value + ') AS ''' + @FieldName + ''' '
SET @InnerTaskSelect = ' (SELECT SU.[UserID] FROM [Security].[Users] SU INNER JOIN [Item].[TaskUserRecords] TUR ON SU.UserID = TUR.UserID WHERE TUR.TaskID = T.TaskID AND TUR.FieldID = ' + @array_value + ') AS ''' + @FieldName + ''' '
END
ELSE IF @FIelDTypeID = 12 --Group
BEGIN
SET @InnerItemSelect = ' (SELECT SG.[GroupID] FROM [Security].[Groups] SG INNER JOIN [Item].[ItemDetailGroupRecords] IDGR ON SG.GroupID = IDGR.GroupID WHERE IDGR.ItemDetailID = ID.ItemDetailID AND IDGR.FieldID = ' + @array_value + ') AS ''' + @FieldName + ''' '
SET @InnerTaskSelect = ' (SELECT SG.[GroupID] FROM [Security].[Groups] SG INNER JOIN [Item].[TaskGroupRecords] TGR ON SG.GroupID = TGR.GroupID WHERE TGR.TaskID = T.TaskID AND TGR.FieldID = ' + @array_value + ') AS ''' + @FieldName + ''' '
END
END
PRINT 'Inner Item Select:' + @InnerItemSelect
PRINT 'Inner Task Select:' + @InnerTaskSelect
SET @IDSelect = @IDSelect + @InnerItemSelect + ', '
SET @TSelect = @TSelect + @InnerTaskSelect + ', '
SELECT @Columns = STUFF(@Columns, 1, @separator_position, '')
END
---------------
That is only part of a large query that writs a SQL Query to a column in a Database. That Query (in the column) is just ran normally so I don't need to compile it each time I want to run it.
THe problem I have is @FieldName might be: ryan's field.
That apostrophe is killing me because the SQL keeps it as ryan's field, not ryan''s field(note the 2 apostrophes). I cannot do: REPLACE(@FieldName, ''', '''') because it's not closing the apostrophes. Is there an escape character that I can use to say only one: ' ?
I tried:
DECLARE @t VARCHAR(500)
SET @t = (SELECT [Name] FROM [Form].[Fields] WHERE FieldID = 1)
print @t -- @t will print: Ryan's Field
PRINT QUOTENAME('' + @t + '', '''')
but that gives me: 'Ryan''s Field'
Any help would rock. If I make any changes to the way this field is input into the DataBase, I know I will need to do a lot of re-work in many spots. WHich is why i'm trying to solve this on the SQL side.
View 4 Replies
View Related
May 19, 2008
Hi All, I am facing quotes problem. Without using the quotes
my query is running fine, but I need to use IIF condition so for that I
need quotes adjustment. I didn't figured it out how to adjust them, try
several techniques but no success. I am using dotnetnuke. {IIF,"[frmradio,form]=text"," SELECT Docs.FileName, Dept_LegalLaw.MediaID, Dept_LegalLaw.ID, Dept_LegalLaw.LevelID, Dept_LegalLaw.LawID, Dept_LegalLaw.LawDate, Dept_LegalLaw.Agreement, Dept_LegalLaw.Name, Dept_LegalLaw.NameSearch, Dept_LegalLawType.LawType, Dept_LegalLaw.LawNo, Dept_LegalMinistries.RegID, Dept_LegalLaw.IssueNo, Dept_LegalLaw.Attachment, Dept_LegalLaw.Amendment, Dept_LegalLaw.Scanned, Dept_LegalLaw.Html, Dept_LegalMinistries.Description FROM OPENQUERY(LEGALDBSERVER, 'SELECT Filename FROM SCOPE() WHERE Contains('" @FilterAnyWrd ")' ) AS Docs INNER JOIN Dept_LegalLaw ON Docs.FileName = Dept_LegalLaw.FileName INNER JOIN Dept_LegalMinistries ON Dept_LegalLaw.RegID = Dept_LegalMinistries.RegID INNER JOIN Dept_LegalLawType ON Dept_LegalLaw.LawID = Dept_LegalLawType.LawID ", " "} {IIF,"'[frmradio,form]'='title'"," SELECT MediaID, Dept_LegalLaw.ID, Dept_LegalLaw.LevelID, Dept_LegalLaw.LawID, LawDate, Agreement, Name, NameSearch, Dept_LegalLawType.LawType, LawNo, Dept_LegalMinistries.RegID, IssueNo, Attachment, Amendment, Scanned, Html, Dept_LegalMinistries.Description, Dept_LegalLaw.FileName FROM Dept_LegalLaw LEFT JOIN Dept_LegalMinistries ON Dept_LegalLaw.RegID COLLATE DATABASE_DEFAULT = Dept_LegalMinistries.RegID COLLATE DATABASE_DEFAULT INNER JOIN Dept_LegalLawType ON Dept_LegalLaw.LawID COLLATE DATABASE_DEFAULT = Dept_LegalLawType.LawID COLLATE DATABASE_DEFAULT WHERE @FilterLawNo AND @FilterLawID AND @FilterRegID AND @FilterIssueNo AND @FilterFromDate AND @FilterToDate AND @FilterNtContNew AND @FilterAgreement AND @FilterAllWrdNew AND @FilterExWrdNew AND @FilterAnyWrdNew ORDER BY [SORTTAG] ", " "} Thanks for any help
View 2 Replies
View Related
Sep 15, 1999
Hi: Got a newbie question that's been giving me fits! Basically I'm replicating what's going on here on this board...creating a "posting" interface that takes the "message" and inserts it into a table using an ADODB connection (using INSERT INTO table name,tablecells and VALUES)
However, if someone types in a single or double quote in the body of the message, I get an error similar to this:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 's'.
/test.asp, line 29
I think I understand why it's happening (SQL is interpreting the quote mark as a string-end), but what am I supposed to do to get around it?
View 1 Replies
View Related
Aug 8, 2006
I've got a flat file data source, that is to large to edit with most Windows apps on my server that contains both single and double quote characters that I need to load in a varchar column.
So I attempted to do it with a Replace in data transformation, but I can't get SSIS to allow me to use a variable or pair of single or double quotes within the replace.
If I don't replace the single quote characters with a pair then the records containing these characters all end up in my failed records output file.
Here are 5 example property legal descriptions from my FLAT FILE data source:
COM 441'6" N OF SW/C OF NW4 OF SEC 22-29-20 ELY1340' N200' CROSSING THE CNTR OF TR AT 100 WLY1240' S200' TO POB CONTAINING 6 3/10 ACRE MOL
N 50' OF S 330' OF W 122' OF E 735' OF SW4 OF NE4 OF SEC 28/28/18 A/K/A LOT
271 BLK "M" OF$PB 14/36-T
LOT 9 BLK "BA" OF$PB 39/1
OVERCODED POST LTS 17 21-42 47-55 & 69 PB 27/110 "ALL" SECS 16-21, 28 29/31/19 & "ALL"
N 100' OF S 815' OF TR "H" OF PB 28/58 LESS W 15' FOR ESMT ESMT DESC AS W 15' OF S 815' OF TR "H" OF PB 28/58
View 2 Replies
View Related
Mar 6, 2007
I tried to set double in bottom border of text file. But it turned out to be single line either Previewing in Designer or Printing or Exporting to PDF. Does anyone have any idea?
View 10 Replies
View Related
Feb 28, 2001
I need to create a proc. which would send a warning via xp_sendmail when the database space gets within 10% of allocated space. I have written one which uses sp_spaceused however this proc requires DBCC udateusage to be run in order to get accurate results. This would work but i don't know how quickly the data returned by sp_spaceused becomes corrupt therefore how often DBCC should be run. I ran DBCC on our main production server and it took a considerable amount of time. Basically I am looking for another way to do this without using sp_spaceused. Any ideas
View 2 Replies
View Related
Jan 8, 2003
Does anyone have any knowledge on how to find out the log space left in a database? I've tried to use the DBCC sqlperf (logspace) and it gave me the numbers but I only need one of the numbers. How can I retrieve it? Someone please let me know if you have any info. Thanks a million.
View 7 Replies
View Related
May 5, 2003
The command sp_spaceused @updateusage = true
returns following result. How do I have to calculate the single values that it gives me an equation:
database size = data size plus reserved space minus etc.
Somehow it is not clear to me how it is split up.
Thank you
mipo
database_namedatabase_sizeunallocated space
------------------- -----------------------------------
opms 3498.88 MB807.41 MB
reserved data index_size unused
------------------ ------------------------------------ ------------------
2479576 KB 1050720 KB 1344792 KB 84064 KB
View 1 Replies
View Related
Sep 29, 1999
I have a 12 GB database growing at 25 MB daily. The server will soon run out of space, 3 GB left. I cannot buy a new server or new RAID subsystems at once, and want to prevent the server being filled up fast.
What are the best ways? Can you share with me some of your thougts or comment on the following:
1) Archive old data in many tables across servers -
Can SQL Server do it directly across server or we need to select into temp database and back it up to tape or using bcp out and in?
2) Put the >9Gb disk dump to another server. The daily disk dump takes up a lot of space.
3) Dump to the tape directly, saving 9 GB disk space of dump device.
4) ? ?
View 2 Replies
View Related
Sep 8, 2006
Hi All,
Which table in the master database has the information about free space available for a particular database? I am trying to find the information that is displayed under the general tab in EM when you look at the database properties.
thanks.
View 3 Replies
View Related
Sep 14, 2001
Hi!
I need to write a sql to find out the space used for the sql server database .
Please help.
Can i use sp_spaceused?
suresh
View 3 Replies
View Related
Jan 26, 2005
I have a fields with the space char in data.
How to find a space character in query?
'Smith David'
View 5 Replies
View Related
Aug 12, 2004
displaying the property of a database? What does it mean?
I am sure when this happens but now when I right click on a database and
select property, the space available= 0.00MB.
I still have physical space on the server.
When viewing the taskpad.
Space allocated:
data 5500MB used, 1700 MB free
log 15MB used, 300 MB free
Please help. Thank you
View 3 Replies
View Related
Apr 28, 2006
Need to know how to shrink a 6.5 DB. When going inot Shrink dialog it won't let me change it to any amount less thatn what it is already set to.
DBCC won't let me do it bc I have to be in single mode.
Any other options? I know in 7/2K you can:
Backup Database dbname with truncate_only and then restore the bak file.
View 3 Replies
View Related
Sep 7, 2005
I have a database with almost 3 tables each contains atleast 1 million Rows, and My hard disk space is 14G.
I want to insert another table some queries i have selected from different tables.
I got this Error:
(254118 row(s) affected)
(935885 row(s) affected)
Server: Msg 1105, Level 17, State 2, Procedure sp_ProcessRowData, Line 68
Could not allocate space for object 'Processed_Data' in database 'Mydb' because the 'PRIMARY' filegroup is full.
Any Help............
Regards Mr. Mumin
Thanks All,
View 8 Replies
View Related
Oct 31, 2005
Hope this question is not too dumb for this forum.. but here goes.
I have a DB on SQL Server 2K which is the backend for our Great Plains System.
When I look at the properties of the Database from Enterprise Manager, It shows Size: 1370.57mb and space available: 0.00 The ZERO space available is what I'm concerned about. The DB is in FULL recovery mode with a nighly Full backup and transaction log backups throught the day. The DB is set to autogrow and the file growth is set at 20 percent.
My question is.. should I be worried about the ZERO space available and if so, how do I correct this??
View 4 Replies
View Related
Jan 29, 2006
Hi, Needs helps.
I have a name filed in my table in sql. My name field combines first name middle name(initial) and last name. I need to combine the name into one string. Example if the name is John K Smith - I need to be JohnKSmith. I try to use replace function which I thought could be best, but is not working- may be I'm missing something. Please, I need your help!
Hiza
View 3 Replies
View Related
Jan 30, 2007
is there a way of taking up to the first space in a string
View 2 Replies
View Related
Sep 27, 2007
Okay, so i've been working in foxpro for a while, but now we're moving on to bigger stronger faster. my question is, in foxpro, i used to be able to fix some name formatting issues with two commands:
replace all fname with subs(name,1,at(' ',name))
replace all lname with subs(name,(at(' ',name)+1),(30-at(' ',name)))
this basically locates the space in the name on each record, and replaces the first name with 0-space and the last with space-end of field
little cude, but it gets the job done. so basically i'm looking for the same solution but for t-sql, i tried something like:
update t1
set name=substring(name,1,at(' ',name))
from temp t1
with no luck, AT() is not an expression in sql, so what is out there that's like it?
View 18 Replies
View Related
Oct 3, 2007
I've a weird problem in my application. In of the pages, while trying to update the text box "Name", when I enter Linda's test, it gets saved as Linda''s test. I'm not sure if this is a problem due to SQL server. When I look at the stored procedure, I don't anything different. Also, when I update the table directly in SQL Server, the result is displayed in single quote. But if I update the field thro' the application, the returned name is with double quotes instead of single quote. Has any of you faced problems like this? What am I missing? What do I need to do to get the name saved the way I entered (with single quotes) instead of double quotes?
View 1 Replies
View Related
Jun 7, 2007
Dear All
My query is reagaing the SQL server space
Imagine a situation where i have purchased server space of 50 kb for my sql server
and at the time of hosting of my web site the size of the data base was 40 kb, once it is hosted
and as the data of users and visitors get stored into the database,it gets expands and the size if the size of the database exceeds the
the occupied space,will my database get stuck or..any other option to overcome this senario or Do i have to get more space periodically.
Help me out
Thank you
View 1 Replies
View Related
Oct 8, 2007
Hi, how does one normally insert a space in a statement like this: INSERT INTO table (column0, column1, column2)
VALUES (getdate(), 'blah', CONVERT(VARCHAR(19), GETDATE(), 120) + 'blahblah')In column2 the output looks like ' 2007-10-08 20:19:08blahblah', but I want it to be like '2007-10-08 20:19:08 blahblah' (two spaces between date and text).Thanks,Chris
View 5 Replies
View Related