Folks ... I have a pipe-delimited ASCII text file with a lot of
different non-printing characters. Rather than try and figure out all
the non-printing characters that exist in this 17+ million record
database, I was hoping someone might have already written a script
they'd be willing to share that would remove all non-printing
characters from an ASCII file?
I have a table named users. It consists of user names, user ids, etc... The problem is that whoever designed the ASP code before me allowed people to enter info in any format they want. This poses a problem because now the name can have 1, 2, or sometimes 3 spaces in between the last and first names. And sometimes the middle initial is used with a period following it. This creates problems when I am trying to execute a Select statement since it won't match if there are an unknown number of spaces in the string and throws an error when a period is used.
Is there a SQL query I can execute to change all the user_names into a format such as the following: LastName, FirstName MiddleInitial
Like I said, it is already almost the same, just has too many spaces and some have periods after the middle initial
I have a table called exchange and field called address. The rows(1400+) in the field look like: MS:VA/Celcmv/VHACLEADAM%SMTP:Doe.Jane@med.va.gov%X200:c=US;a= ;p=av;o=Celcmv;s=Doe;g=Jane;
How do I remove everything to the left of doe.jane@med.va.gov and everything to the right of doe.jane@med.va.gov using query analyzer? Thank you in advance...
Can someone please suggest a function to remove the last 3 characters from a column? I was thinking of the LEN function, but I am unsure of the syntax.
I've got one SQL Server 7.0 table with a "Decsciption" Column of length 4000. The values in this column contains "End of Line" ASCII Character. The ASCII Value of this character is 10. I'm not able to remove this ASCII Character. I tried by using REPLACE function. But i could not remove that character.
I am using the following expression to strip the last 11 characters in a field group and it returns an error saying that Len cannot use a negative number. It must be 0 or greater. Is there a better alternative?
I was wondering what would be the best way to remove special characters like, '-', '&' '(',')','#','*', etc... from a number string. To be specific a phone Number string where the string is >= 10.
I have a table with several columns of information that I wish to set up some form of schedule to go through this data and remove any special characters that may interfere with other code processes.
Mainly the coma's and the apostrophes. It really messes with my asp pages and scripts when retrieving this information and trying to do other things with it, so I need to figure out how to remove these from the tables so it does not cause these issues.
Knowing this, I cannot figure out how to keep the data in the row/column and just extract the special characters from that data. The other problem is, everything I try requires me to insert either a coma or apostrophe as part of the code string which in lies my issue.
How can I parse through my data, leave the data as-is, but just get rid of coma's, apostrophes, and double quotes?
Does anyone have a basic example that I can use to expand on?
SET @Counter = 1 SET @Max = (SELECT Max(DTect_Supplier_SRN) FROM SUPPLIER_TABLE_TEST)
WHILE @Counter <@Max BEGIN SET @MATCH_Supplier_name = (SELECT Match_Supplier_Name FROM SUPPLIER_TABLE_TEST WHERE @Counter = DTect_Supplier_SRN) SET @Index = LEN(@MATCH_Supplier_name) WHILE @Index > = 1 SET @MATCH_Supplier_name = CASE WHEN SUBSTRING(@MATCH_Supplier_name, @Index, 1) LIKE '[a-zA-Z]' TH EN SUBSTRING(@MATCH_Supplier_name, @Index, 1) WHEN SUBSTRING(@MATCH_Supplier_name, @Index, 1) LIKE '[0-9]' THEN SUBSTRING(@MATCH_Supplier_name, @Index, 1) ELSE '' END + @MATCH_Supplier_name SET @Index = @Index - 1 --PRINT @MATCH_Supplier_name SET @Counter = @Counter + 1 END
I usually do this through Access so I'm not too familiar with the string functions in SQL. My question is, how do you remove characters from the middle of a string?
Ex: String value is 10 characters long. The string value is X000001250. The end result should look like, X1250.
I've tried mixing/matching multiple string functions with no success. The only solution I have come up with removes ALL of the zeros, including the tailing zero. The goal is to only remove the consecutive zeroes in the middle of the string.
I have a varchar field which contains some Greek characters (α, β, γ, etc...) among the regular Latin characters. I need to replace these characters with a word (alpha, beta, gamma etc...). When I try to do this, I find that it is also replacing some of the Latin characters.
So I have been asked by our sustainability person to create report from our printing data that actually shows the number of pieces of paper used. This is easy enough for single-sided printing, but when printing in duplex the software does not take into account that 3 printing pages actually equates to 2 pieces of paper. I know this sounds simple, but say I have a print job record that looks like this:
Submitted printed total_pages duplex 8/10/2015 8/10/2015 42 1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
This is a print jobs that if done correctly is actually 21 pages( duplex printing). If the job is say total_pages =5 I cant just divide by 2 because its actually using 3 pieces of paper ( yes they are wanting this data don't ask why). How can I adjust some sql to accurately depict 5 pages, front and back, as 3 pieces of paper?
I have deployed a report that is configured for landscape printing. It does print in landscape, however, only the first seven columns appear on the first page and the other five columns appear on the next page. Is there a method, like in print preview setup in MS Excel, where we can scale down the print (like to 80%) so all columns appear on each page?
In my application I must store over 16000 character in a sql table field . When I split into more than 1 field it gives "unclosed quotation mark" message. How can I store over 16000 characters to sql table field (only one field) with language specific characters?
Hi everybody, I would like to know if there is any property in sql2000 database to separate lowercase characters from uppercase characters. I mean not to take the values €˜child€™ and €˜Child€™ as to be the same. We are transferring our ingres database into sqlserver. In ingres we have these values but we consider them as different values. Can we have it in sqlserver too?
I am developing an applicaiton through which, i want to print from pocket pc emulator 2003. I am using PrinterCE.NETCF SDK to do this task. I am able to print from my applicaiton like we do in ASP (Printing one line at a time). In PrinterCE, there is an option of printing the output to a file. But, I am not able to find how we do it.
So, I want to know how we can print the output through PrinterCe into a file. Can anybody help me??
Hey all, I'm new to SQL and am having some troubles w/ a problem I was given. I have two tables (OrderTableA & OrderTableB) which are linked by an OrderID. What I need to do is have the two tables printed out to two txt files. Below is the code I have so far.
SELECT OrderID, "#" + OrderDate AS OrderDate, "&" + CustomerID AS CustomerID, Total FROM OrderTableA;
SELECT OrderID, Quantity, Discount, UnitPrice FROM OrderTableB;
The txt file for OrderTableA has to look like this: !!OrderID OrderDate CustomerID Total ---------- ----------- ----------- ------ 123456 #123456 &123456 123456
with the !! before OrderID in the header, the # before OrderID in the table and the & before the CustomerID in the table.
I'm not sure my code above is correct so far, and I've no idea how to print this to two txt files.
Any help would be greatly appreciated!! Thank you!
I have a report with two columns. It works fine in SQL Reporting Services, but when I push it to the Report Server it only prints one column instead of the two that it's set up to print.
Hi i'm having a problem in printing a reporting services report. Between each page it's giving me a white paper. What can i do in order not to get the white papers anymore? Any help?
I have a script or SP that takes a very long time to performmultiple tasks, and after each one there is a PRINT statementthat shows the time and what was just accomplished, to help memonitor what's happening and estimate how long it will take.In a script, I can put a GO after each PRINT to cause the outputto appear immediately, but that's not possible inside an SP.Instead, it seems the output goes to a buffer, and the bufferis only output when a PRINT causes the buffer to become full.Sometimes there is a long delay before the buffer fills. Isthere a way other than GO to cause immediate printing? (Iguess I could just use longer messages, and fill up thebuffer with every one, but that's not very elegant.)Thanks,Jim GCountrywide Home Loans
Hi! I recently begin to use reporting tools of SLQ 2005 instead of AR or CR. I found the DUI very easy to use and I'm partially sastify beause when I try to print my report, the printer always blow out a second white page. For one page report I can live with that but for 156 page report it's becoming a lot annoing. Is there somebody who experience the same problem? And by the way resolve it?
Here the dexcription of the report:
Is a list grouped by clientId with a sub report getting the clientId from the parent one as the parameter. Event with the insert page break after list true or false the result is the same while printing.
I have created a blank report in VS 2005. I set the pagesize to 21cm x 29,7cm (A4) and margins to 1cm. Body size is 19cm x 27,7cm. I set the body border to 1pt. When I print this blank report I won't get printed as I expcted. The printed margins are very different from the margins which I set. Hos can I solve this problem?
We are displaying the reports in Web Application using Report Viewer control.When we run the report and want to take printout we are clicking on Print button of Report Viewer then it is giving error "Unable to Load Print control" Install some activex control.
With out this error how can we print the report. How to overcome this waring.
We have created reports with page size width : 11in and height : 8.5in so that we get pages printed in the landscape mode. We use HP LaserJet 3500 and reports were printing correctly in landscape format. Everything was working fine till we introduced a new printer Dell 1110 laser printer to the environment.
When we have our Dell 1110 laser printers set as default, the page setup IS NOT set to landscape and when I manually change it to landscape, it prints in a compressed portrait image rather than landscape.
However when the HP LaserJet 3500 is set as the default, it prints correctly in landscape.
As the client is using Dell 1110 laser printers i need to fix this issue immediately. Can someone guide me in resolving this issue..
Is there a way to save print settings with the report so that settings such as the size of paper (A4, legal...) and layout (landscape, portrait) do not have to be specified by user everytime she wishes to print the report?