retieving data from a sql table

Hi,

I'd like to be able to automatically fill certain columns in excel
with data from an SQL table. For example, I have a column called "item
code" and I'd like the columns "item description" and "item cost" to
be automatically retrieved from an SQL table when the user inputs the
item code. I'm having trouble in two areas. One, getting it to perform
automatically once the data is inputed, and filtering the records to
include only the description and cost for that specific item code.
I've tried using macros and the "Get External Data" in the Data menu.
I haven't been able to succeed in passing the value of the "item code"
cell as a parameter. I'd appriciate any help whatsoever, and I thank
you in advance.
0
sprucecmr (1)
10/6/2004 7:55:11 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
546 Views

Similar Articles

[PageSpeed] 8

Using Get External Data, after you go through the selection Edit the 
query is MS Query.  In the item code column enter [enter item code. 
This should bring up the screen for prompting.  Return the data to Excel 
and move the cursor into the data query area and go to Get External Data 
and choose Parameters and you should be enter to your cell in "Get the 
value from the following cell" and check the Refresh automatically option.

The only issue with this is that the last update I did now prompts when 
opening the workbook, asking the user to enable auto refresh.


HTH.

cmr wrote:
> Hi,
> 
> I'd like to be able to automatically fill certain columns in excel
> with data from an SQL table. For example, I have a column called "item
> code" and I'd like the columns "item description" and "item cost" to
> be automatically retrieved from an SQL table when the user inputs the
> item code. I'm having trouble in two areas. One, getting it to perform
> automatically once the data is inputed, and filtering the records to
> include only the description and cost for that specific item code.
> I've tried using macros and the "Get External Data" in the Data menu.
> I haven't been able to succeed in passing the value of the "item code"
> cell as a parameter. I'd appriciate any help whatsoever, and I thank
> you in advance.

0
scott5891 (51)
10/6/2004 8:11:17 PM
Reply:

Similar Artilces:

Running saved query from Data menu
In older version of Excel, you use to be able to go to the Data menu and select "Run Saved Query". Now that I've got Office XP, it's disappeared from the menu. How can I run a saved query? ...

How to retieve Data from Socket with Timer Events..
Hi How to retieve Data from Socket with Timer Events.. Pls Specify full sourc ecode or Sample ..how we can use FD_SET or Select to read or write data . Please help me.. sanjayrvyas Why use a timer event? What do timers have to do with this problem at all? Also, if you need asynchrony, avoid FD_SET, Select, and all that low-level rubbish; either use CAsyncSocket, or buy a third-party socket library. joe On 3 Feb 2006 05:25:45 -0800, "Sanjay" <Sanjayrvyas@gmail.com> wrote: >Hi >How to retieve Data from Socket with Timer Events.. >Pls...

Stopping chart line where 1 of 2 columns of data in calculation is blank
I have a chart where there are two columns of data used to create a number in a third column. I have tried to use both #N/A, NA() and "" to stop the resulting chart line when one of the 2 columns is blank but have had no success. Any suggestions would be greatly appreciated, Roger is there not a provision in tools-opiton-chart plot empty cells - not plotted Roger B. <rb10@canada.com> wrote in message news:uVTrncciFHA.320@TK2MSFTNGP09.phx.gbl... > I have a chart where there are two columns of data used to create a number > in a third column. I have tried to use...

retieving data from a sql table
Hi, I'd like to be able to automatically fill certain columns in excel with data from an SQL table. For example, I have a column called "item code" and I'd like the columns "item description" and "item cost" to be automatically retrieved from an SQL table when the user inputs the item code. I'm having trouble in two areas. One, getting it to perform automatically once the data is inputed, and filtering the records to include only the description and cost for that specific item code. I've tried using macros and the "Get External Data" in ...

Windows XP, Excel 2000: ODBC driver for Visual FoxPro tables
Hi I have some made some Excel applications which are querying data from dbf-based 3rd-party program, using ODBC driver for Visual FoxPro tables(Data.GetExternalData....). Applications are made on Win98 computer, they are situated on shared network resource, and are accessed from different computers - until lately with Win98 as OS in general. There were no problems until we replaced some computers with new ones - with Windows XP installed. For first such computer I downloaded a driver from Microsoft (~ year ago), and it works. But meanwhile I had to replace a hard disk in my own computer, an...

Conditional Formating based on Data Validation
Hi, i am trying to get a row to change colour (using conditional formating) based on the data selected in a cell. The cell is based on data validation. I set up a colum for the data validation (colum H) and used this as the basis for the data validation list. However, i cannot get the row to change different colours based on the option selected (e.g., On Order, Fitted, Query etc) in the row. I can however, get the single cell (e.g., H11, H12 etc) to change differebt colours but not A11 - G11 etc). Please help! I think this might be straight forward but i am missing so...

Formatting the label and number of a table in cross-references
Hello, I'm using Calibri (Body) font size 12 as the normal style in a word document. When I insert a cross-reference for a table (as in "Table XX shows..."), the font of "Table XX" automatically becomes Times New Roman 12. I checked the styles menu but couldn't find anything relevant on the list. I'll be glad if someone could help me with it. Thank you in advance, Baran It seems as if direct formatting has been applied to the cross-referenced item; such formatting would be repeated in the cross-reference. Modify the style you are using f...

write a query to retrieve data
I have three sheets in my workbook: Request sheet with request number and date,Fault sheet with request number and faults count,and in the third sheet I have month start date and end date. I want to retrieve data such that : sum of all the faults of those requests which fall in the month given in third sheet Request Sheet Request ID ActualEnd Date 1 1/22/2006 2 2/27/2006 3 1/22/2006 4 1/22/2006 5 1/22/2006 Fault Sheet Request ID Total 1 6.75 2 3.75 3 7.50 third sheet Jan-06 1/1/2006 1/31/2006 to get value Hi, There may be a better way of organizing yo...

Sorting data
Hi, My question here is.. how to sort a set of data in MS CRM system? For example, there is a set of data from "Case" that contain 3 types of category which are 'Problem', 'Request' and 'Question'. My question here,what should i do so that i can sorts the data those data? If it is query/filter data, that will be no problem, but this is about sorting the data. ...

Data Validation, Invalid Data Imput
I'm using data validation for a drop down list in several sheets in a workbook. I have them all accessing a list that is on worksheet one. Access is through defining a name for the list called =salespeople. The problem is, I can't get the Invalid Data Stop message to work. If I access the list without the using the name =salespeople for the source and just use direct cell references it works fine. Is this a glitch or by design? brodiemac Wrote: > I'm using data validation for a drop down list in several sheets in a > workbook. I have them all accessing a list th...

Selection of data for plotting graphs
To all, I have a workbook with multiple worksheets labelled data1, data2, data3, and data4. I also have one sheet called 'graph'. On worksheet labelled 'graph' I have a line graph that currently plots the data in sheet 'data1'. however what I want to do is as follows: Add a dropdown menu to sheet 'graph' Use this dropdown menu so that I can select which data is displayed in the graph. i.e. data from 'data1' or data from 'data2' etc. The format of the data i.e. column headings and layout is the same for each worksheet. The length of the data is...

exporting data
What is the best way to export specific data to excel or .csv format? JayK, Create a report that has the info you wish to export, right click on the body of the report, Export | File | Comma Separated CSV and give it a name of the file. -- * "JayK" <JayK@discussions.microsoft.com> wrote in message news:A7B82E63-4B8C-4B68-8A8B-EB36D0F1DCC4@microsoft.com... What is the best way to export specific data to excel or .csv format? From an existing Active Report is very simple. Just run the report and at the top of the report you should see an icon to the left of the one th...

How can I import Act! 2006 data to Outlook 2003?
I want to convert my contacts in Act! 2006 to Outlook 2003 so I can export the contacts from Outlook 2003 to my Nokia phone. Apparently Outlook 2003 can import Act! 2000 but there is no listing for Act! 2006. If I try importing Act! 2000 I cannot find the file type Outlook is looking for. can you convert them to Act2000 format? Another format outlook supports? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://...

How to send data from webservice
Hi, This may be off topic but for sure someone will able to help me. I have a web service that return 1MB data. When I ran the client it took 10 sec to get the data but when I checked the server side it took only 1 sec to build the data. Is there a way I can send the data much faster? Where is this 9 sec overhead coming from? Thanks a lot. CSharper wrote: > Hi, > > This may be off topic but for sure someone will able to help me. I > have a web service that return 1MB data. When I ran the client it took > 10 sec to get the data but when I checked the server side...

auto fill a cell with the same data
i want to fill a cell with '-----'. if it is a wide cell or narrower cell,is there a key stroke that you can precede the character '-' with to fill the entire cell instead of entering the character lots of times to fill it? Thanks - Kev. Format / Cells / Alignment Tab / Horizontal / Fill This will fill the cell with whatever character(s) you put in the cell. -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL2K & XLXP ---------------------------------------------------------------------------- ...

Importing Data & Refresh Data
I have for some time updating a worksheet in Excel 2002 from a CSV file. The source of that file has now switched from comma separated to tab separated. I can't seem to prevent Excel from trying to read the file wrong. I can't even import the tab-separated file into a blank worksheet within the same Excel file. How do I cancel out Excel's inappropriate knowledge of the file so that I can tell it about the tab-separated version? Thank you, George Is the extension of the file still ".csv"? If so, change it to ".txt" and use the Text Import wizard to import...

Retrieve info from History Tables
Is there a way to get sales info back out of history? A sales invoice & cash receipt were double entered. Then everything was put to the history tables. I would like to correct this double entry, but I am unsure of how to given that it isn't an open transaction. All entries are in the current year, but have simply been sent to the history tables. Adam, If the Sales Invoice was entered in SOP, then you will need to enter a Sales Return transaction. This will also take care of the inventory portion of the transaction. If the Sales Invoice was entered via Receivables Manageme...

Whats the fastest way to retieve data in asp.net using MySql
I know this is not a MySQL forum, but we use ASP.NET and MySQL. My questions is what is the fastest, most efficient way to retrieve data using asp.net using MySQL 5? thanks in advance Are you referring to ODBC/OLE DB connection settings, how to write SQL queries, embedding queries in the asp.net pages, or calling stored procedures? I'm sorry, but your question is just too vague. Perhaps if you explained why you're asking the question and why you're asking it in a SQL Server group. FWIW, generally connecting async and writing stored procedures for ever...

Non-numeric Data
Hi All, I'm trying to run descriptive statistics on data that has been copied and pasted from a .csv file but it says some of the data is non numeric. i've used the view cell contents download, i've tried trim and clean, i've tried multiplying everything by 1, all without success and i'm going mad here. Does anyone have any ideas? Thanks in anticipation, Angela You could enter the formula =VALUE(A1) in a spare column, Format the cell to Number with appropriate decimal places, and copy the formula down. Do this for the other columns of data. Fix the values of the formulae...

Upsize AutoNumber field to SQL Server
The Upsizing Wizard Add-In in Access 97 would automatically create an Insert Trigger when upsizing to SQL Server. But when I use the built-in Upsizing Wizard in Access XP (2002), it doesn't seem to create those triggers. Is there an option I'm missing somewhere or will I have to manually create those triggers for my upsized DB? TIA! ...

Charts different data sources
Hi, My problem. I have a workbook with more than 50 worksheets. All the worksheet have the same structure and each I would like to embed 3 different chart, one for income, other for cost and another for Ebitda. I would like to make a template for each chart and copy for the others worksheet. Questions: 1 - How can I make this dynamic as I would like to choose hom many months I would like to show in each chart? 2 - How I keep the reference for the data source in each worksheet? I tried to use the functions offset, 3d range and others functions but I could�t make them work. Can somebo...

data file: how to start its application
Hello! I have a byte array in memory for a file and also its filename (actually a mail attachment). Now I want to "open" this file. In case of a "*.doc" file I have to find the association (winword), run that program and give it a path to my memory or something like that. I think the simplest way to achieve this is to save the data into a temp file (GetTempPath + actual file name, overwriting any previous one), and then running RunCmd somehow and Windows knows what to do. I know how to write the file, but a RunCmd command doesn't exist or I haven't found some...

merging data
I have a master file and 4 workbooks where individuals enter info daily. I need to update the master file workbook at the end of the day with the info from the 4 individual notebooks. How would I merge this data? I tried the "shared workbooks" process but it wouldn't let me do it. Please Help! Since your question is very "general", here's a "general" suggestion: Explore the use of links. Have all WBs open. Right click in a pertinent data cell of one of the 4 WBs, and choose "Copy". Navigate to the appropriate cell in the "Master&quo...

Vertical Data Extraction
Hi, I need to create a chart that is based on changing values. The Values are all stored vertically in a Worksheet called Percentage. The chart sheet contains a selection box where the user can select a specific search and a date and the selected conditions should be searched for and the chart should display results. Basically, when the user selects X in the first list box and Y in the second one, the code should search the Percentage worksheet for all instances of value=x and y and output. column Row Feature1 Feature2 Feature3 2000 0.5 8.3 10 2000 ...

Pie Chart from data
Hi, I am trying to create a pie chart from the below data just to show the percentages of what work orders are maj, med and min. How do I set this up!! Thanks in Advance!!! how can i create a pie char By following the directions within the Chart Wizard. -- Regards, Tushar Mehta, MS MVP -- Excel www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <9265C290-B0B6-4CAD-B909-5EDFCE7DC415@microsoft.com>, anonymous@discussions.microsoft.com says... > how can i create a pie chart > > ...