Adding characters in string MsAccess 2000 - ms-access-2003

I have table with one field:
Postal
48016350
48016350
48016350
48016350
48016350
I need to add "0" before each record and add "-"(dash) after 5th character in my MsAccess 2000 database.
My goal is:
Postal
04801-6350
04801-6350
04801-6350
04801-6350
04801-6350
Thank you for help.

You can do this with an update query:
UPDATE table
SET postal = "0" & Left(postal,4) & "-" & Right(postal,4)
You can paste the SQL into SQL View of the Query Design window. Make sure you make a copy of the table first.

Related

How to include function text in a formula?

This is probably a very simple question, but i'm trying to write a formula which will display text depending on the value that is being run.
However, the text i require has the word "Floor" in it which is a function, therefore when i save the formula it warns me saying There is an error in this formula. Do you want to save it anyway?
Is there a way i can include the word Floor in the text, such as putting '' around the word?
For example
IF {database.column} = 3 THEN "3rd Floor"
try this, i think CR is expecting an Else statement
IF {database.column} = 3 THEN
"3rd Floor"
else ""
I found the issue, it was the fact that i had a line break in it without specifying it with Chrw().
Right-Click on feild then Formate Object & insert formula in Display string
IF {database.column} = 3 THEN '3rd Floor'

Get string within a specific string

Please excuse the stupid question, but I am an absolute freshman in Crystal Reports.
I would like to add a plaintext to Crystal Reports. The problem is, if a hyperlink has been inserted that contains a display text, it will be displayed as follows:
HYPERLINK "http://google.de/https://www.google.com/webhp?hl=de&sa=X&ved=0ahUKEwipsMvN_-vkAhWCEVAKHf3JBCIQPAgD " google.com
I just want the hyperlink to be displayed within "
The result should be https://www.google.com/webhp?hl=de&sa=X&ved=0ahUKEwipsMvN_-vkAhWCEVAKHf3JBCIQPAgD
However, it is also possible that "hyperlinks" that do not contain a hyperlink may occur.
My professor has created an Access database that contains texts and hyperlinks and I have to display the hyperlinks correctly.
Some lines of the database:
HYPERLINK "http://votetandem.org/" votetandem.org
HYPERLINK "https://app.votetandem.org/"votetandem.org
Sometimes there is a space between "URL" display text and sometimes not
Use the REPLACE() function. Hit F1 for online help.
I found a solution for my problem. I created a formular field. chr(34) is " in ASCII
If InStr({TABLE},"HYPERLINK " & chr(34)) > 0 Then
Split({TABLE},chr(34))[2]
else
{TABLE}
the URL is the second entry. The first is Hyperlink, second real URL and the third the displayed name.

Put excel all cells under each other in one column

Is there a possibility or formula, to extract all cell data from different columns then putting them under each other just on one column, each cell data just in one cell, therewith I can sort them e.g. from A to Z in one column.
Thanks in advance
Solution 1
Using helper column.
In Cell E2 enter the following formula
=INDEX($A$2:$C$15,MOD(ROW()-ROW($G$2),ROWS($A$2:$A$15))+1,TRUNC((ROW()-ROW($G$2))/ROWS($A$2:$A$15))+1)
Drag/Copy down as required.
Then in Cell F2 enter
=IFERROR(INDEX($E$1:$E$45,SMALL(IF($E$1:$E$45<>0,ROW($E$1:$E$45)),ROW(F1)+1)),"")
This is an array formula so commit by pressing Ctrl+Shift+Enter. Drag/Copy down as required. Change range as required.
See image for reference.
Solution 2
Using ugly looking long formula.
Enter the following formula in Cell D2
=IFERROR(INDEX($A$2:$A$15, SMALL(IF(ISBLANK($A$2:$A$15), "", ROW($A$2:$A$15)-MIN(ROW($A$2:$A$15))+1), ROW(A1))), IFERROR(INDEX($B$2:$B$15, SMALL(IF(ISBLANK($B$2:$B$15), "", ROW($B$2:$B$15)-MIN(ROW($B$2:$B$15))+1), ROW(A1)-SUMPRODUCT(--NOT((ISBLANK($A$2:$A$15)))))), IFERROR(INDEX($C$2:$C$15, SMALL(IF(ISBLANK($C$2:$C$15), "", ROW($C$2:$C$15)-MIN(ROW($C$2:$C$15))+1), ROW(A1)-SUMPRODUCT(--NOT((ISBLANK($A$2:$B$15)))))), "")))
Drag/Copy down as required. Change range as per you data.
Note : This formula will work only for three or less columns.
An easier way without using any formula. Just go to Find & Select, go to special, select blanks. All the blanks are now selected go to

Include detail in table of figures that is not in the caption

I've got completely stuck on something that should be trivial: I am working with MS Word 2003, and am putting together a table of figures. I need to have more detail in the table of figures than I have in the caption. For example, in the caption I have:
Fig 1: John and Jenny in London
and in the table of figures I need to the source and accessed date:
Fig 1: John and Jenny in London, available at www.johnandjenny.com, accessed 03/09/2013
I have tried using hidden text in the caption, but the hidden text is not included in the table of figures. The only other thing I can think of is to include all of the detail in the caption, but make the bit that I don't want to show white. This is not ideal, because sometimes the additional detail is several lines long, and this will create a dead space in the caption.
Does anyone have a better way to do this?
Thanks
Sorry - didn't find your question on SU, so posting my answer here ...
Mark your complete caption and press Alt+Shift+X to create an index entry {XE ...} where in the subentry you add your "hidden" text. Then - instead of a table of figures - create an index and add the \r switch to get index entry and subentry on one line.
example:

Textfile as a datasource for MailMerge in MS Word - how to insert manual linebreak instead of paragraph mark in field?

I have created a textfile as a datasource for a mailmerge in microsoft word. This is working great. Now, i have fields which contains multiline values. When I use this field in the template it creates a "hard" line break (paragraph mark). What does I have to insert into the textfile, that word will creating a "soft" line break (manual line break)?
first:apologize for bad english grammar or vocabulary use.
the way is working with {quote} in ms-word, for example {quote 11} is line break or {quote 12} is page break.
to set it in your document, you should familiar with fields.
press Ctrl+F9 to insert field and then insert "quote ##" (## is any number charchode) in it. then press F9 to Enter and execute.
0x0b (i.e. "Vertical Tab") is probably the only way to do it, but I would check that you don't get document corruption in the output.