Query Parameters: Editing The Middle Of A String

Jan 3, 2007

My question is in regards to query and setting up parameters. I have the following query (I am using an example for security purposes)

http://examplenet.test.com/aaaa/Search/SearchList.aspx?type=Number&criteria=AA21&mode=New&rfilter=****&afilter=A&exact=False" _

What I am trying to do is have a parameter for the user to change the AA21. For example the user could type AA33 and it would change the code to:

http://examplenet.test.com/aaaa/Search/SearchList.aspx?type=Number&criteria=AA33&mode=New&rfilter=****&afilter=A&exact=False" _

I am familiar with creating parameters and have been able to add things to the end of the string but not in the middle. I have been trying a very long time to figure this out.

View 6 Replies


ADVERTISEMENT

MS Query - Parameters (parameters On A Query But Use A Wildcard To Return All Instances)

Nov 17, 2009

Is it possible to set parameters on a query but use a wildcard to return all instances? I have a query that I want to be able to set multiple parameters on but give the user the ability to select as many or as few parameters as they want to see. 2 of the parameters are number fields and 2 are text fields with no spaces.

View 4 Replies View Related

Query Parameters Which Takes The Date From The Cell Into The Query

Mar 29, 2007

Need the query parameters which takes the date from the cell into the query. How should I modify my query if it needs to take the date from a cell?? The bold one date should be picked from one of the cell in sheet 2.

My query is this
WEB
1
http://fc-web-phl1-101.phl1:8090/gp/...runReport.y=12

Selection=15
Formatting=None
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False
DisableDateRecognition=False
DisableRedirections=False

View 2 Replies View Related

MS Query With Parameters

May 22, 2007

Is there any way to use an Excel cell as a parameter for MS Query.

i.e. Select fields from table where field = "cell value"

I tried the $ ($D$5 ) got Invalid pseudocolumn error; which leads me to hope there might be a way to introduce a VALID pseudocolumn in my Query.

View 9 Replies View Related

MS Query Parameters

Feb 4, 2009

I have a query that has criteria based on "is one of". I would like to pass this off to a parameter selected from a list box where the user could select multiple items. Is something like this possible?

View 9 Replies View Related

Excel2003 :: VBA To SQL Query With Parameters

Aug 20, 2013

I am trying to write an SQL query using parameters in an Excel Worksheet and then return the results to the current sheet ar cell B11. I have found it imposible to make it work in SQL so am trying to run it from VBA to pass the parameters. These are named cells StartDate and EndDate in cells A2 & A3 respectively and should replace the constant dates below. I am working in Excel2003 & MS SQL 2012.

I have tested the query on SQL server with fixed values (which are still in it). It works fine & I have pasted it in.

I took an existing query I found & tried to modify it for Excel2003 but ... Whatever syntax I use, I get a Run-time error 424 when I get to a line with 'connection'

Code:

Sub DateQuery()
With ActiveWorksheet.connections("ndserver01").oledbconnection
' .Connection = "OLEDB; DSN=Excel Files; provider=SQLOLEDB; Catalog=NDM_Sage200;Data Source=ndserver01"
.Refresh BackgroundQuery:=True
.CommandType = xlCmdSql

[Code]...

What have I done wrong

View 1 Replies View Related

Web Query With Hidden Parameters

Aug 12, 2008

The web site is http://scores.covers.com/college-foo...chups.aspx?t=0. This website defaults to a Top 25 scoreboard. I would like to access the Full scoreboard instead. I've looked inside the web site source code for the parameter names, but using the most likely candidates in web queries pull in the Top 25 scoreboard instead. The web site name does not change when scoreboards are changed.

View 9 Replies View Related

Microsoft Query Multiple Parameters

Mar 12, 2014

I would like to have set of data as Parameter if possible.

Example: In Microsoft Queries I have two data sets. In first one shows let's say Item Number, and second one I should have table with components of all Item numbers listed in first table.

So first table I set one Parameter (?) and i get like 8 results. I would like that second table takes those 8 results (sometimes more or less then 8) as parameter and shows data (components) for them.

If I set sign '?' I can only select one cell as parameter, is there any way I can select multiple cells as parameter and use it like SQL function IN ?

Code:
SELECT 1.ITMNR, 1.COMNR, 1.QTYPR
FROM 1.1.1 1

WHERE 1.ITMNR IN ?

And second table should look for results in first table under 1.COMNR and select it as 2.ITMNR

Code:
SELECT 2.ITMNR, 2.COMNR, 2.QTYPR
FROM 1.1.2 2

WHERE 2.ITMNR IN ?

View 4 Replies View Related

Query Access Database Using Cell Reference Parameters

May 28, 2014

Is it possible to use cell references to define parameters in an SQL query to an MS Access database?

I assumed it was similar to using SQL but I'm getting an error in excel.

Here is my query: .....

The error I get in excel is: "Invalid character value for cast specification" and it wont let me specify a cell.

View 6 Replies View Related

Excel 2010 :: Workbook With Two Sheets / Query Parameters

Mar 6, 2012

I have a workbook that contains two sheets with two separate queries. On the first sheet I have two cells designated to accept the values for the parameters. The first sheet accepts the values and populates the table correctly. The second sheet doesn't seem to accept the values and just returns blank rows.

View 9 Replies View Related

Pull Data From The Middle Of A String

Jan 13, 2009

I have a spreadsheet of location names that look like this:
UT-04560803-DF3
AZ-57611564-S32
etc...

I'm looking for a way to pull the last four digits out of the middle section of these entries, so that I end up with:
0803
1564
etc...

View 9 Replies View Related

Delete Middle Part Of Text String

Mar 30, 2009

I am looking for a formula to delete information from the middle of a text string. I have ~ 1,000 lines of data. Each text string is composed of the same way. The data I am looking for is two parts of the string (1) all the text up to and including the first “%” character (2) the last six characters.

Raw Data
CARDINAL HEALTH 5.5%13CARDINAL 5.513 CARDINAL HLTH 5.5 061513
UST BILL 0%09US TREAS BILL 0%09 UST BILL 0.0 092409
WORLD SAVINGS 4.125%09WORLD 4.125%09 WORLD SVGS 4.125 121509
JP MORGAN 5.375%12JP 5.375%12 JPMORGAN CHS5.375 100112

Desired Result
CARDINAL HEALTH 5.5% 061513
UST BILL 0% 092409
WORLD SAVINGS 4.125% 121509
JP MORGAN 5.375% 100112

View 2 Replies View Related

Pull Number From Middle Of Text String

Mar 24, 2009

I would like one formula to remove "5206" from this string. I tried a combination of right/left formulas together, but I could not get it to work.

5032.5206.05816.00040501.0000

View 9 Replies View Related

Formula To Pick Out Text In Middle Of String And Return

Jan 20, 2014

I am looking for a formula to remove the text 2.2 from the string Rav4 2.2 D-4d X or 1.33 out of Yaris 1.33 Vvt etc, I have tried using the formula

=IF(P2="","",VLOOKUP("*"&P2&"*",AM$1:AN$25,2,1))

But it just keeps returning #N/A. I have all the variables outlined in cells AM$1:AN$25 hence the reference. I currently have the formula

=IF(P2="","",VLOOKUP(P2&"*",AK$1:AL$25,2,1))

Which is working perfectly @ finding and returning the start of the string but just cannot get the one to find the middle characters.

View 6 Replies View Related

Extract 1st 2 Words & Middle Section From Text String

Jun 18, 2008

I have a text string with 3 data to be extracted and then split throu range, but only specific parts is needed.

string is like that:
Name Surname - Number : ################ - Exp : YYMM - Centre etc etc....

Lets say its allways happens in cell A3, for example:
Adrian Kukuwas - Number : 1235467890123456 - Exp: 1009 - Centre... I would like a macro:

*that runs only if string starts with a letter, then if so
*takes Adrian Kukuwas to cell D3
*takes 1009 (the exp) to B3 and makes it look like 09 10 (or 09_10)
*in A3 leaving only the number 1235467890123456 text formated (sometimes the copy source formats the cell for bad)

View 9 Replies View Related

Extract Parameters From A String Of Text?

Dec 11, 2013

I'm trying to find a formula which in essence is the same as 'text to columns'.

I'll be pasting in post strings such as: A=B&C=D&E=F etc etc.

I need a formula to break the url so i have all the individual parameters listed i.e

A=B
&C=D
&E=F

Can this be done without a macro? Also i'm not fussed where the '&' belongs either at the front or the end of the text string.

View 5 Replies View Related

Extract Middle Words From Text String With Multiple Dots?

Oct 22, 2012

black.blue.red.yellow.green.white

I'd like to extract just "blue.red.yellow.green" to the following spreadsheet column, keeping the intermediate dots, but getting rid of the first/last words and their succeeding or preceding dots.

I've tried using RIGHT, LEFT, MID formulas unsuccessfully

View 3 Replies View Related

Editing String Based On Length

Sep 1, 2009

I get all my results from a CSV file. This isn’t a problem except for the first nine days of the month where excel cuts off the first 0 so 01012009 reads 1012009 and cannot be properly concatenated.

DateNameItem
1012009BobKeyboard
1012009SidMouse
1012009DaveMonitor
1012009EdMonitor
1012009AndrewKeyboard
1012009DanKeyboard
1012009BruceKeyboard

What I would like to do is have VB read the contents of the date cell and if it is less than eight characters, edit the cell by adding a zero at the beginning of the string. This needs to be a one off process for all cells. Can anyone come up with code that might make this happen?

View 9 Replies View Related

Removing Text From Middle Of Text String?

Jan 31, 2012

I am trying to remove a middle initial from a text string however not all of the cells have middle initials. In column B I would like to return the first and last name. If needed I can have the first name in column B and the last in column C then combine them.

Example
John A Smith John Smith
John Smith John Smith

View 2 Replies View Related

Find Text String In Web Query

Feb 18, 2010

I want to find the number within this webpage and report it to a Cell in excel....

View 6 Replies View Related

VBA Set ODBC Connection String For Query

Jul 25, 2008

My workbook has 9 queries, all needing the same string. I would like to have a msgbox pop up, let them enter the directory name, and have that change all the odbc conneciton strings automatically. Can anyone point me in the right direction?

The message box would be a nice touch, but is not necessary, I can change it in the VBA editor if needed.

Currently, they connect using a Visual FoxPro ODBC driver. We setup the connection when we made the queries. Now that they are in on the worksheets, I want to be able to edit them with VBA instead of using the script editor (which is very slow).

View 9 Replies View Related

Numeric String Manipulation Query

Dec 23, 2009

I have a sizable spreadsheet, which has one column where the cells are mostly numeric strings of up to 6 numbers - there are variations, which I will mention.

What I need to do, is to treat the numbers as individual figures, and add them, then divide by the number of figures. e.g. cell value '123456' I need to process as (1+2+3+4+5+6)/6.

The variations are that '0' has to be added as 10, and any letters need to be added as 12. '-' and '/' which are the only non-alphanumeric values should be ignored.

View 9 Replies View Related

Pass Parameter From Excel Through MS Query To MS Access Query

Nov 26, 2012

I have an MS Access query that contains a parameter. The parameter is a date field, and I have configured that in the Access query. If I run the query within the MS Access user interface, it prompts me for the paramater value as expected, and runs just fine. However, I want to connect to this query from within Excel as a data source.

I have created a connection to the Access file using ODBC from within Excel. In the MS Query window, I am merely selecting all of the fields resident in the MS Access query, and returning all values. In other words, there is no selection criteria in the MS Query. I have done this many times with Access queries that DO NOT contain a parameter, and everything works fine. However, in this instance, I need to pass a parameter through to MS Access in order for the query to run. At the moment, I get the "Too Few Paramaters...1 expected" error message. This makes sense, because I haven't figured out how to pass the paramater to MS Access.

Is there a way to structure this that does not involve VB code? If so, I'd love to know how. I have tried creating parameters in MS-Query with the same name, but although I get the prompt it doesn't connect with the Access query as the source for the parameter value.

If the solution requires using code, I'm good with VB Code in Excel...is there VB for Excel code that could make this happen?

Failing that, I guess there must be (I've seen a few in my search thus far) Access VB Code that can make this work. I'm very rusty using VB with Access, so this is my least favored solution. However, if this is the only option, keep in mind that I need to pass the paramater ultimately from a user who will initiate the process using Excel.

View 3 Replies View Related

Create An Conection With MS QUERY To A Csv And Query Data

Sep 6, 2008

I have a csv file on another drive on the network that i need to query. I believe that ms query would be the best way. I know that a DSN needs to be setup but this macro will be used by various users who wont know how to do that. thus I would like to create one via VBA every time the task needs to be run.
I haven't a clue how to do this and i need it to be explained to me in general terms with words of one syllable!

View 9 Replies View Related

Query An Access Query With VBA Function

Jul 8, 2008

I'm trying to query a query in Access 2003, from Excel 2003.

The query in Access looks like:
AccessQuery: [SELECT VBAFunction(field1) FROM Table]

The query in Excel looks like:
ExcelQuery: [SELECT * FROM AccessQuery]

I use the following VBA code in Excel to excecute the query:

With ThisWorkbook.Worksheets(cDataSheetName).QueryTables.Add(Connection:=strConnection, _
Destination:=ThisWorkbook.Worksheets(cDataSheetName).Range("A1"), Sql:=strQuery)
.RowNumbers = True
.Refresh BackgroundQuery:=False
iResultRowCount = .ResultRange.Rows.Count
End With
When I execute this code I get the error message 'SQL Syntax Error' (Error 1004). When I remove the VBA function from the query in Access, it all works fine.

View 9 Replies View Related

Edit Query Using Query Wizard

Apr 25, 2006

I created an Ms Excel Database Query to bring in data from MS Access. (versions 2002 of MS Excel and Ms Access). The query works fine initially. I can right click, choose Edit Query and change my criteria. Results are returned almost instantly.

My problem is that, once I save the workbook, or autosave happens, I get an error when I right-click to Edit Query: This query cannot be edited by the Query Wizard..

View 2 Replies View Related

Get Rid Of Middle Initial

Jul 6, 2007

how can I do this?

Mike A Johnson
Tomas P. Carbone
Samuel L Jackson
Peter B. Lacrone

some have the period some dont.

im thinking I could just get rid of the periods first with a simple find/replace

so getting rid of just the middle initial ?

View 9 Replies View Related

Going Out Of A Loop In The Middle

May 16, 2006

I want to get out of a loop in the middle of it, with out going out from the whole procedure.

By the way, is there is possibility to send him to other location in the code instead of going out of the loop?

Do While ( Cells(counter, 5).Value = 1)
'some commands
If R(1) >= 0.83 * R(2) Then
'some commands
Else
' here I want it to go out of the loop,
' but not to get out of the whole porcedure
End If
counter = counter + 1
Loop

View 7 Replies View Related

First Name-Last Name To Last Name-First Name Some With Middle Initials

Mar 8, 2008

An application I use at work exports names in a first name-last name format. At this point I have a list of about 315 names in this format. Is there a way I can convert these names to a last name-first name format? I need to export these data on a daily basis, so I'll need to perform this conversion every day. I did a search for this, but didn't find anything.

View 9 Replies View Related

How To Change First And Last Name When Person Has Middle Name

Apr 4, 2014

I have a worksheet with some names in a column with a persons first name then the second name and I would like to place the names in a different column I can have this to work ok with the following formula

=MID(A1&" "&A1,FIND(" ",A1)+1,LEN(A1))

This works ok but I have people with three names like Peter May Jones

When I have changed the name I would like to have (Jones, Peter May) but I get (May Peter Jones)

Also the colon I have after the first name gets put at the end of the name not after the last name.

View 12 Replies View Related







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