A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Extract data



 
 
Thread Tools Display Modes
  #1  
Old May 24th, 2004, 10:32 PM
Tony
external usenet poster
 
Posts: n/a
Default Extract data

I'll give it a whirl.

Thank you very much John.
Tony


"John Spencer (MVP)" wrote in message
...
The following strips off everything from the front.


MID(YourString,Instr(1,YourString,"c_login") + 7)

Say that is X, so to get everything up to the semi-colon, but one string

doesn't
have a semi-colon at the end so you must add that in.

LEFT(x &";",Instr(1,x &";",";")-1)

So, substitute the above for X

LEFT(MID(YourString,Instr(1,YourString,"c_login") + 7)
&";",Instr(1,MID(YourString,Instr(1,YourString,"c_ login") + 7)

&";",";")-1)

Tony wrote:

I want to be able to see who is logging into my website so I turned on

W3C
logging and then I importated it into Access. The information I need is

in
one of the columns but it isn't always in the same location within that
particular column. Is there a way to have Access find the word

"c_login="
and then the semicolon immeaditaly following the actual name of the user

and
only display the login name? Here are 2 examples:

Example 1
What I have:

fcmcookie=homecookie;+c_login=tony;+c_login_hash=1 c02bab305d5e26a6afda4bce7d
3c81d;+c_user_type=u;+c_user=tony
What I want: tony

Example 2
What I have:

c_login=day_mi;+c_login_hash=a26f8a056be8d6a6c2f98 11de5da205e;+c_user_type=u
;+c_user=day_mi
What I want: day_mi

There are a few others but I didn't want to list them all. I just

wanted to
give you an idea as to what I'm working with.

Any help is greatly appreciated.

Thank you in advance,
Tony



  #2  
Old May 25th, 2004, 07:01 PM
Tony
external usenet poster
 
Posts: n/a
Default Extract data

John,

You are the fricken man!!! This is awesome, thank you very much.

Tony


"John Spencer (MVP)" wrote in message
...
The following strips off everything from the front.


MID(YourString,Instr(1,YourString,"c_login") + 7)

Say that is X, so to get everything up to the semi-colon, but one string

doesn't
have a semi-colon at the end so you must add that in.

LEFT(x &";",Instr(1,x &";",";")-1)

So, substitute the above for X

LEFT(MID(YourString,Instr(1,YourString,"c_login") + 7)
&";",Instr(1,MID(YourString,Instr(1,YourString,"c_ login") + 7)

&";",";")-1)

Tony wrote:

I want to be able to see who is logging into my website so I turned on

W3C
logging and then I importated it into Access. The information I need is

in
one of the columns but it isn't always in the same location within that
particular column. Is there a way to have Access find the word

"c_login="
and then the semicolon immeaditaly following the actual name of the user

and
only display the login name? Here are 2 examples:

Example 1
What I have:

fcmcookie=homecookie;+c_login=tony;+c_login_hash=1 c02bab305d5e26a6afda4bce7d
3c81d;+c_user_type=u;+c_user=tony
What I want: tony

Example 2
What I have:

c_login=day_mi;+c_login_hash=a26f8a056be8d6a6c2f98 11de5da205e;+c_user_type=u
;+c_user=day_mi
What I want: day_mi

There are a few others but I didn't want to list them all. I just

wanted to
give you an idea as to what I'm working with.

Any help is greatly appreciated.

Thank you in advance,
Tony



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.