Qry To Find Strings With Len=10 And No Same Letter Twice ...

Apr 5, 2006

I have a two tables with about 44.000 words that I need to search.

I need to find words that are exactly 10 characters AND where each letter is only represented once ...

Anyone that has an idea how to write that query?

Any help would be highly appreciated.
Thanks from cold Denmark,

Steff

View Replies


ADVERTISEMENT

Need Query For Max Date To Find Most Recent Letter Sent Using Distinct Addresses

Feb 21, 2014

I'm trying to create a report for how many "nasty grams" (rejection notices) my company has sent to people who keep sending in paper forms when they are supposed to file electronically.Every letter that goes out has information recorded based on whatever they sent to us - so the only remotely reliable way to count how many each person received is by the address on the envelope (people use different names, different business names, use different telephone numbers on the forms, etc).

I just built several queries that feed into a report that gets sent to my boss on a monthly basis to show the people who've sent in more than one paper form and have received our rejection notices more than once.I'm not the greatest at SQL, but I've been trying to find a way to use DISTINCT Addresses, leave all other fields the same (not DISTINCT), to:

1. Only return people who have received 2 or more letters

2. If at least one of the letters was sent more than 90 days ago
AND If at least one of the letters was within the last 90 days
-If at least one was within the last 90 days, only display the most recent send date of the letter (lots of people get back-to-back letters).

3. Display their names, addresses, telephone numbers, the date of the most recent letter sent, count of the total letters ever sent to that person. (the report will already do this, just need Max date)

My first query counts the number of times each address appears in the main table and simply only has [Address] and [CountofAddress]

My second query has the [Name], the [LetterDated] >=Now()-90, and the qryCountofAddress is linked to the main table by [Address], using [Countof Address] >=2...I have tried Selecting Unique Values in the Properties tab. Yes, I have tried INNER JOIN (but can't get the rest of my fields to display once I make addresses distinct).

View 1 Replies View Related

Strings Within Strings Using Expression Builder

Jun 6, 2007

Hello

I have two tables with names of people in different forms.

table1 : [name] can be either in the form of :
- firstname & firstname surname
- surname, firstname

table2: [surname]

I'm trying to select all the records in table1 where [table2]![surname] is part of [table1]![name]

I've tried using

Like "*"&[surname]&"*"

This returns everything rather than the similar names.

I think this should be simple but can't work it out.

View 1 Replies View Related

Storing The First Letter Of First Name, First Letter Of Last Name And Data Of Birth

Feb 19, 2006

Hi,

I'm designing a database in which the primary key is a combination of the first letter of first name, the first letter of last name and the date of birth.

How can I do that?

Regards,
CS

View 8 Replies View Related

Letter By Letter Search Through A Table

Aug 21, 2005

ok here is what i want.. imagine a search box, just an empty text box that allows the user to type things into it...

there will be a simple table from the database behind it, here is the typical structure of a record

<Country>Poland
<Price1>60
<Price2>85
<Price3>95

in this table there will be say a 1000 of these records...
my user is going to have to quickly search through these records while on the phone to a customer, and quote one of the relevant prices associated with that country

what i would like is this most convenient system..
as the user types in the letter 'P' just below all the records with countries that begin with 'P' are displayed (with a scroll down arrow if needed)..as well as the 3 relevant prices with that record

if they then type an 'O' into the box (which will now hold 'Po') all the records with countries beginin with 'Po' will be displayed (eg Poland)

if they delete the 'o'. once again the displayed records below the box will return to just the countries begginin with 'p'

all that is needed is for the records to be displayed, thats it.. but the adding and deleting of the letters within the text search box will need to instantly manipulate this list..

i have posted on other forums, and have been told this can be acheived in access, is it hard?

View 9 Replies View Related

Unit Of Strings

Nov 8, 2005

Hi,

I have 2 strings:

str1 = SELECT Field1, Field2, Field3, Field4 WHERE (Criteria1)
str2 = SELECT Field1, Field2, Field3, Field5 WHERE (Criteria2)

I want to show in listbox only "Field1" from str1 and str2.
How unit 2 strings?

Thank You in advance.

View 4 Replies View Related

How Unit 2 Strings?

Mar 31, 2006

Hi all.

I have 2 strings:

strSQL1 = SELECT FieldA FROM table WHERE FieldA = xxx
strSQL2 = SELECT FieldB FROM table WHERE FieldB = xxx

I need unit this two strings to third string strSQL3.
I must have result StrSQL3 = SELECT FieldA, FieldB FROM table WHERE FieldA = xxx and FieldB = xxx

Is it possibly unit strings (not Select Query)?

View 4 Replies View Related

Adding Strings Together

Nov 3, 2007

So I need to know this. How do I:

*Add 2 text fields together with a space between?
*Truncating field 1 to the first character and field 2 to the two first characters?


Sorry for my noob questions :D

View 6 Replies View Related

&gt; Than Comparision In Strings

May 23, 2005

Hi. I am trying to compare 2 string values.

5:00
5:45
9:54
10:15

Lets say those are my values. Well in the formula >"5". 10 Will not show up correctly. Does anybody have a piece of code or something that will correctly display 10 as >"5". Any help greatly appreciated. Thanks

View 3 Replies View Related

Joining Strings

Aug 23, 2005

Seems like a simple question but I am stuck.

I need to join two strings from different records in a table

table eg

ID Desc
1 blah blah
1 more blah
2 blahring
2 blah
3 and last one


I want to join all the "Desc" strings that have the same ID to get

1 blah blah more blah
2 blahring blah
3 and last one

Can anyone help?? :o

Thanks

Paul

View 1 Replies View Related

Splitting Strings

Dec 15, 2005

I am normalizing data from a spreadsheet of just over 4000 records. The spreadsheet has a "Model" field that contains both the model number and a model description, separated by a space. I would like to split this field into two different fields: "Model_Number" and "Model_Description". The model number is one word of varying lenths.

Any ideas?

View 5 Replies View Related

Null And Zero Strings

Nov 2, 2006

Hello,

I am having trouble with a query. I have a number of blanks for a field and I tried using the expression from the help:

=IIf(IsNull([fieldname]),"Unknown",Format([fieldname],"@;LS"))

But my result set is still a lot of blanks.

This is the expression I was trying to use:

IIf(IsNull([tblMainpersondata]![MailingAddrLine2]),[tblMainpersondata]![MailingAddrLine1],[tblMainpersondata]![MailingAddrLine2])

On most of these, the result was a blank, instead of MailingAddrLine1. If there was visible data for MailingAddrLine2, it appeared.

Any help or suggestions would be greatly appreciated!

View 2 Replies View Related

Comparing Two Strings

Jan 29, 2007

Hey Guys,

Just wondering how I would go about comparing two strings, and spitting the results out a similarity percentage?

E.G. (String 1) Postal Address: "11 John St"
(String 2) Street Address: "11 John Street"
(Output): 80%?

Cheers

View 5 Replies View Related

Compare Strings In SQL

Jul 10, 2007

Hello,
I would like to put a restriction on the SQL statement such that if one particular field contains the character "MO", then we take in the record, else we ignore them. May I know how could this be done in the "WHERE" part of the SQL statement? I do not think SQL would read things like Instr(). Thanks!

Regards,
Anyi

View 13 Replies View Related

So Confused With Strings!!! Please Help!!!

Nov 15, 2004

Hi all,

Please can someone help. I am trying to pass a query to the database from vba but can't seem to get the string concatenation of fields correct.

Clinical area and title of audit are database fields. Any ideas please? Thanks!

Here is what I have:

StLc = "[Clinical Area] = """ & Me![Combo309] & """ & """ And """ & [Title of Audit] = """ & Me![Combo309] & """"



View 1 Replies View Related

Counting With Strings

Dec 18, 2004

Hoi,


I have a loop where i use a string (strCount). The first time I run the loop strCount has de value A. The second time strCount must become B, the third time C, etc

I already tried to strCount = strCount + 1 but it did not work
does someone know how to do this?

greets
Koen

sorry formy wad english

View 2 Replies View Related

Help With Normalization (strings, Oh My)

Feb 9, 2005

This is a database that was handed off to me for upgrading.

The person who initially created it made the Name field in the table contain the entire name... So a single entry in the field looks like

CHRIS R LOUNSBURY

The table is in the attached table. This is merely a sampling. The main table has over 3,000 names in it. Is there an easy (or maybe not so easy) way to automatically parse that data and split the names into their own fields.

An example would be the string CHRIS R LOUNSBURY. Run code which takes the string left to right to the first blank space, and splits it off into First Name field. Take the last part of the string (right to left) to the first white space and put it in the Last Name field.

Is this possible? Or do I need to find myself a temp employee to data entry all this over again

View 14 Replies View Related

Declaring Strings

Oct 1, 2007

Hi all

I have a Row source string which I use quite often. Currently, I declare it in each procedure and copy and paste it in. The problem is when it needs changing, I need to change it in a billion places.

can I declare the string as public and set it as public too so that I can just make a reference to it rather than copy and paste entire slabs of code into each event??

perhaps I need to place it into a module?

Suggestions are much appreciated.

View 12 Replies View Related

How To Sort Alphanumeric Strings

Nov 1, 2006

Access does not have an option to sort alphanumeric strings properly with the result that sorting a column with the following (sort of) data is almost impossible.

Flat A1
Flat A10
Room A13
Room A2
Room A21
B5
Flat 5b
10k1
10 k3
10 k12
10 k20
10 k2

etc

I need to be able to get addresses sorted correctly and they always have a mixture of alphabetic and numeric characters.

The steps I have followed to try and achieve this are as follows:

Create a matchfield containing the data for sorting (typically the street number followed by the flat number/name)

Split the matchfield into separate fields where there are spaces. "Room A13" becomes "Room", "A13"

Then split the fields/columns by separating the alphabetic and numeric portions - i.e. "Room A13" becomes "Room", "A", "13". This I have not been able to achieve successfully.

(Thinking about it the first step of separating by spaces is probably not necessary. All that is needed is to separate the numeric and alphabetic data)).

Once you have separated the data into alaphbetic and numeric content a sort is straightforward.

Why can't Access cope with what I would regard as a fairly basic requirement (i.e. to be able to sort alphanumeric strings correctly).

Does anyone have a suggestion how I can solve this problem until Access is improved?

View 11 Replies View Related

Importing Text Strings

Jan 14, 2008

hi guys,

i am importing a tab seperated file into a table, and one of the fields is a user comment.

all is well -- until a record is imported that contains comment with a carriage return followed by some more text. the text after the carriage return is imported as the next record.

if the file is tab seperated, why is the carriage return causing the import to act in this way?

thanks

rik.

View 6 Replies View Related

Problem With Using Expressions With Strings

Mar 2, 2006

Im relatively new using queries.

I'm confused. I developed a subset of data in the same general format as our main database. When running select and update queries on this subset, I am able to use Left, Right and Len expressions such as "Right([Year],2)" and "Right([Latitude],Len([Latitude])-3) to update and generate new fields of edited data. However when I use the same expressions on the same tables and fields in the main database, I get a reply such as Function is not available in expressions in query expression 'Right([Year],2)'. A coworker says he has encountered the same problem. Has anyone else encountered this and found an interpretation/solution????

View 2 Replies View Related

Parsing Text Strings

Feb 15, 2008

I'm trying to parse text strings by certain spaces and characters within the string. For Example, if my text string is RAST 2006-A1 B1 mtge, how can I 1) create a new field with just the RAST 2006-A1, 2) Create a field with just the RAST 2006-A1 B1?

I appreciate any help I can get. Thanks!

View 6 Replies View Related

Zero Length Strings In A2007

Apr 23, 2008

I posted this before, but didnt get any answers

In A2007, has anyone had a problem with checking whether a text field is equal to "" in a query

ie - select * from whatever where targetfield = ""

-----------
this generated a type mismatch (I actually had <is null or ""> in the query definition, but it was the "" it didnt like.

View 1 Replies View Related

Creating SQL Queries From Strings (VB)

Dec 14, 2005

Does anyone know how to create a query object using a string that contains SQL code?

The reason I ask is that I want to be able to run an ad hoc query, but I can't use a RecordSet because there's no way (that I know of) to take the results of a recordset and create a query display out of it (meaning, make it look like a query was executed)

So what I really want to do is to create a query, and then execute it with "DoCmd.OpenQuery()" If that's possible. Any ideas?

View 5 Replies View Related

Loading Subforms Using Strings

Aug 23, 2006

hi... I have a form containing 120 subforms...

the form will be loaded depending on the user...
i name my subforms in sequence that is: loadA1, loadA2, loadA3,....

to load a form I just use the code: me.loadA3.sourceobject = "FormName"

and then I make a counter to keep track of which forms are loaded and which one to load next.. as they load in sequence..

the question is if its possible to write the above code in a string type or other way to make the code shorter...

For example my code is as follows: If ACount = 0 Then
Me.LoadA1.SourceObject = "TEMPCableName"
ElseIf ACount = 1 Then
Me.LoadA2.SourceObject = "TEMPCableName"
ElseIf ACount = 2 Then
Me.LoadA3.SourceObject = "TEMPCableName"
ElseIf ACount = 3 Then
Me.LoadA4.SourceObject = "TEMPCableName"
ElseIf ACount = 4 Then
Me.LoadA5.SourceObject = "TEMPCableName"
ElseIf ACount = 5 Then
Me.LoadA6.SourceObject = "TEMPCableName"
ElseIf ACount = 6 Then
Me.LoadA7.SourceObject = "TEMPCableName"
ElseIf ACount = 7 Then
Me.LoadA8.SourceObject = "TEMPCableName"
ElseIf ACount = 8 Then
Me.LoadA9.SourceObject = "TEMPCableName"
ElseIf ACount = 9 Then
Me.LoadA10.SourceObject = "TEMPCableName"
ElseIf ACount = 10 Then
Me.LoadA11.SourceObject = "TEMPCableName"
ElseIf ACount = 11 Then
Me.LoadA12.SourceObject = "TEMPCableName"
ElseIf ACount = 12 Then
Me.LoadA13.SourceObject = "TEMPCableName"
ElseIf ACount = 13 Then
Me.LoadA14.SourceObject = "TEMPCableName"
ElseIf ACount = 14 Then
Me.LoadA15.SourceObject = "TEMPCableName"
ElseIf ACount = 15 Then
Me.LoadA16.SourceObject = "TEMPCableName"
ElseIf ACount = 16 Then
Me.LoadA17.SourceObject = "TEMPCableName"
ElseIf ACount = 17 Then
Me.LoadA18.SourceObject = "TEMPCableName"
ElseIf ACount = 18 Then
Me.LoadA19.SourceObject = "TEMPCableName"
ElseIf ACount = 19 Then
Me.LoadA20.SourceObject = "TEMPCableName"
End If

If ACount < 19 Then
ACount = ACount + 1
ElseIf ACount < 0 Then
ACount = 0
Else
ACount = 20
End If


anyway to make it something like:

"me.loadA" & Acount & ".SourceObject = "TEMPCableName"

??


Thanks in advance
help is much appreciated

View 2 Replies View Related

Situation With Similar Strings!

Apr 10, 2008

I have supplier records where the supplier name in each record is different. It may be Supplier ABC, AB,C, ABC!, ABC Inc., or several other variations. In addition each of these suppliers has their own supplier ID. The supplier ID can be one of 5 different versions since the data is from 5 different ERP systems. I am trying to create one table that does not have the supplier listed many times, but has one correct name and one ID that will be able to link back to the original file with all the different names and IDs. I hope this is a good explananation. Any advise?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved