PDA

View Full Version : charting data from SQL query


itsmillertime4u
09-08-03, 10:33
I'm having problem charting data from a Excel spreadsheet that is pulling its values from a SQL database. When the query runs it inserts numbers into the cells, and then I'm trying to chart those numbers into bar graphs. The problem is for some odd reason when I go to produce the chart it wants to merge all of the cells data into one bar graph, instead of having individual bar graphs for each value. Does anyone know what could be causing this?

Dcutler
09-08-03, 17:37
Are you using the Excel chart wizard? Check all your chart defaults,especially whether your data range is seried by Rows or Columns. If its an SQL query, my guess would be the records come in ordered by row, so on the "Source Data" option in the chart menu, click on Data Range & make sure the "Series in:" flag is set to "Rows".

If you can give a sample of the data you are trying to chart, it might help, along with a little more detail or an example of what you mean by merging all the cells data into one bar graph. Also, what version of Excel are you using?

itsmillertime4u
09-10-03, 16:08
I think I found what was causing this to happen. The data tha I was pullnig from a SQL into the Excel spread sheet was defined as nvarchar data. I found that when I graphed this type it would have these problems. I could graph int data from the same SQL database, but not the nvarchar data. Does anyone know what the nvarchar data type means?