Can this conversion be done using Microsoft Access?
If so how? Could this be done using TRANSFORM and PIVOT SQL statements?
The Old Format columns are NO and URL
The New Format Columns are No, User1URL and User2URL
Old Format
NO URL
16 http:/16_User1.html
16 http:/16_User2.html
18 http:/18_User1.html
18 http:/18_User2.html
New Format
NO User1URL User2URL
16 http:/16_User1.html http:/16_User2.html
18 http:/18_User1.html http:/18_User2.html
7 11361 Delerna 1,134
Recognized Expert Top Contributor
Its called a crosstab query in access
Goto the queries tab and click new. You should see a crosstab query wizard option
Choose that and follow the prompts, you should find yours fairly simple and intuitive to create
The crosstab wizard generates 4 columns of URL information, because each of the abbreviated 4 URL's are variables that has a common element being User1 or User2 buried within it. I was hoping to generate a column of URL information for User1 and a column of URL information for User2 which would be the specified column headings. The crossab wizard does not allow this.
Delerna 1,134
Recognized Expert Top Contributor
You need to make a query off your table
The query needs to extract the User1,user2 info from the url into a third field so that you get this.
Use cominations of the left() right() and or mid() functions to get it -
NO USR URL
-
16 User1 http:/16_User1.html
-
16 User2 http:/16_User2.html
-
18 User1 http:/18_User1.html
-
18 User2 http:/18_User2.html
-
Now you create the crosstab off that with
NO as the row headings
USR as the column headings
and URL for the values
I did it with a mockup of your data and it works with the output thus -
User1 User2
-
16 http:/16_User1.html http:/16_User2.html
-
18 http:/18_User1.html http:/18_User2.html
-
Delerna 1,134
Recognized Expert Top Contributor
Here is the query I did for the mockup of your data -
SELECT [NO], Left(Right([url],10),5) AS Usr,[url]
-
FROM TheTable
-
-
If the character length of the userID in the url is variable then you could use the InStr() fuction and find the positions of the _ and the . and then get the characters between them.
Thanks for your prompt reply. I didn't phrase my question very well! I also have a term labeled AreaSupport that I did not include in my original problem that does not work with your response. If you could give me the query to delimit the value with the underscore preceding and the period following , I would really appreciate it!
Delerna 1,134
Recognized Expert Top Contributor -
-
-
SELECT NO,
-
Mid([url],InStr([url],"_")+1,InStr([url],".")-InStr([url],"_")-1) AS USR,
-
[url]
-
FROM TheTable
-
-
You have solved all my problems for me! (At least my programming problems)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Victoria Holowchak |
last post by:
I was hoping that Microsoft Access 2002 would allow users to see all
the columns of an Oracle database table that contained more than 255
columns. I noticed that my Oracle8 ODBC driver is only at 8.1.6.0.0
for win95, win98 and winNT. If I upgraded my ODBC driver would Access
be able to recognize the columns beyond the 255th column? or is this
an Access limitation?
Please don't lecture me about good table design and recommend
splitting...
|
by: Michael SL |
last post by:
I am trying to get the Table Column definitions from a Microsoft Access 2000 database (*.mdb). Using VB with System.Windows.Forms.Form I do the following
Dim OpenDBDialog As New OpenFileDialo
OpenDBDialog.Filter = "Database files (*.mdb)|*.mdb
OpenDBDialog.RestoreDirectory = Tru
If OpenDBDialog.ShowDialog() = DialogResult.OK The
Dim ColumnName As Strin
Dim ii As Intege
Dim jj As Intege
Dim oConn As OleDbConnectio
|
by: Hannie |
last post by:
I am currently doing my project using VB.NET
I have a database which contains all my data that the user key in.
The problem is, when i click the retrieve button on the form, the
details that the user keyed in cant be retrieve.
The connection is made, just that the data cant be retrive.
Hope someone can help mi... Thanks. its urgent... =]
|
by: dhussong |
last post by:
I am attempting to use Visual Studio 2005 (Visual Basic) and the Enterprise
Library 2.0 Data Access Application Block with a Microsoft Access database. I
know the names of my Access databases but I don't know their location until
the user has started using the application. Therefore I cannot hardcode the
location into the app.config file as the Data Access Application Block seems
to need. So I have 2 questions:
1. Is it possible to use a...
|
by: glenn |
last post by:
Hi folks,
Have read a bit on this topic but so far no positive results.
I have the following table named 'discussions':
id discussionNumber from to status
1 1 xxx xxx done
2 1 xxx xxx done
3 2 xxx xxx done
| |
by: Steven TK |
last post by:
Hi everyone,
I wonder who can help me on the filter the Start Date and End Date. I still cannot manage to filter it.
Eg. When the user click the StartDate(comboBox as 16/7/07), the Start Date(textbox should show only 16/7/07) and this also apply to the EndDate.
Private Sub cboStartDate_Click()
'Purpose: Build up the criteria string form the non-blank search boxes, and apply to the form's Filter.
'Notes: 1. We tack " AND " on the end...
|
by: mcVBNet10 |
last post by:
I am working on a project in VB.Net using access as backend. But I wanted to take advantage of access reporting power. Therefore I was trying to see if I could open an Access Report (Built inside of access) from within VB.Net using the command Docmd.OpenReport. All of my attempts have given no results yet. I neet some help. I don't know if it is possible.
Thanks
|
by: BharathP |
last post by:
Hi,
I need to transfer data of one of the table in DB2 to Microsoft Access. I tried using DBOP data source using Configuration assistant in DB2 and SQL passthrough in Microsoft Access. I think I'm doing some mistake in the configuration. Can anybody pls tell me the exact steps to configure it. Or is ther any other process to accomplish this task?
Thanks in advance,
Bharath
|
by: BharathP |
last post by:
Hi,
I need to transfer data of one of the table in DB2 to Microsoft Access. I tried using DBOP data source using Configuration assistant in DB2 and SQL passthrough in Microsoft Access. I think I'm doing some mistake in the configuration. Can anybody pls tell me the exact steps to configure it. Or is ther any other process to accomplish this task?
Thanks in advance,
Bharath
|
by: ncsthbell |
last post by:
I created a database using full blown access 2007. I have put it out for users to grab and test using Runtime Access 2007. They have entered data and now I need to go back into a table and change a setting for a different test. I am opening the same database using full blown MS 2007 and when I do, it appears I have no tables or queries. I have gone to the navigation pane, navigation options and set the property to show hidden objects but the...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |