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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|