Selecting Maximum Values in a Query with joins to other tables
I'm having difficulty with a query and hope someone can help me out.
Basically, I'm looking to select the maximum amounts from a table based on a
column in one of the tables named StateID.
It works fine when I do this:
SELECT TOP (100) PERCENT dbo.Bids.StateID, MAX(DISTINCT dbo.Bids.Amount)
AS Amount, dbo.States.StateName
FROM dbo.Bids INNER JOIN
dbo.States ON dbo.Bids.StateID = dbo.States.StateID
GROUP BY dbo.Bids.StateID, dbo.States.StateName
ORDER BY dbo.States.StateName
However, when I start to join fields from other tables in...Pie of Pie Chart type with smaller pie showing slices of main slic
How can I do the following:
Lets say I have the following labels and data
For the main pie I have A,B,C labels with A =5, B =10, and C =20. So my
main pie would show 3 slices with C being the largest slice.
To do this I highlight the 3 labels and their data and choose Insert, Pie,
Pie in a Pie to show a main pie on the left with 3 slices and a smaller solid
pie to the right with series lines connectiing them.
I want to show the solid smaller pie on the right in several slices to show
how the C slice of 20 is broken down. lets say the main slice C of 20 is made
up ...adding records to multiple tables in MSDE 2000 from XML using ADO.NET
I am using .NET web aplication and MSDE 2000. I receive new record in
XML format which I want to add into MSDE 2000. I am doing it as below.
Private Sub InsertNew(ByVal sData1 As String)
Dim SR1 As System.IO.StringReader = New
This works fine with one table.
But say, I receive following XML data:
<NAME>SONY - 32 inch</NAME>
<QTY...Typing in macros
I have made a few macros and use them in word and excel
2000. When I see typed out macros on the message boards I
am not quite sure how to use them. Do I go into the
editor, type them in and then link them with a button on
the toolbar? What module do I put them in and is there
one for the personal worksheet. I have been struggling
with the syntax of Visual Basics for years. Just need a
step by step explanation.
Thank You Sue
In general, the macros you see in the groups are likely to be ordinary macros
that will go into a general module in the VBE, eg:-
Hit ALT+F11 and this will...Open File Dialog to fileter multiple file types at once...?
Here is another quick one for you all. The solution is probably simple, but
I cannot find the answer anywhere.
I have the following code:
CFileDialog OpenDlg(TRUE, NULL, NULL, OFN_ALLOWMULTISELECT |
// Later must set this to retrieve a value from the registry
OpenDlg.m_ofn.lpstrInitialDir = "c:\\";
OpenDlg.m_ofn.lpstrFilter = "txt Files\0*.txt\0Doc Files\0*.doc\0";
I am trying to get the box to filter out everything but the *.doc and the
*.txt files ... I have seen some boxes that have something that...Table Size Limitations 09-08-05
I am hoping you can help me answer this probably easy question.
I am trying to add some new columns to the contacts table in 1.2 and I
believe I am running into a space limitation. I have added about 550 bytes
of information to the table and then I started getting the error. There
error that I am getting or the system log does not have any information in it
as to what the error is.
I am a little confused as to why I would be getting this error, I realize
that there is a 8000 byte sql limit, but the stock contact table has around
3700 bytes and I have only added 550 bytes. Whe...How to bring a dialog itself to top?
I have a dialog based MFC application. In this app, there is only dialog,
and there is a textbox on the dialog. Also there a thread in this app that
receives data from IP intranet. If the thread receive some message, then I
need the user to input something in the textbox. At that time, I want to
bring the dialog to top and put input focus to the textbox.
I use the folloing code in CMyDialog:
pl.length = sizeof(pl);
if (pl.showCmd == SW_SHOWMINIMIZED)
pl.showCmd = SW_RESTORE;
...Rectification of wrong posting type
There is one PL account say "Mic Expenses" has got wrong posting type
"Balance sheet", when we closed the year 2005 ,System has brought forward
the balance of that account into next year 2006, which otherwise should have
been gone into the Retain Earning of 2006, is there any option to rectify
this error, other then passing rectifying JV in 2005(coz in that case if I
take last year TB then ending balance of this account would be Zero) or
restoring the backup and doing closing procedure again.
Thanks in Advance
There is a Article ID for this in partner s...Build Table of Figures with Figure Number, but without caption lab
Anyone know how to build a Table of Figures that includes the figure number
and page number, but doesn't include the caption label "Figure" repeated for
every entry in the table?
This can't be done unless you use a macro to build the TOF.
What you can do, via the user interface, is exclude the label *and* the
Microsoft Word MVP
"Michael" <firstname.lastname@example.org> wrote in message
> Anyone know how to build a Table of Fi...how do i work with column header in visio 2003? is this a table?
column header in visio 2004 is a table or just a blank page?
...Some chart types cannot be combined with other chart types?
I am getting the above error message everytime I try to insert a chart or
any type into a completely blank presentation using either the Insert, Chart
command or the Insert Chart button in the Title and Content slide layout.
I am using 2007. Any help or suggestions would be appreciated.
Try running Office Diagnostics, Shane. Open PPT or Excel, hit the Office
button, then <app> Options | Resources. I think that may resolve this issue.
Echo [MS PPT MVP] http://www.echosvoice.com
What's new in PPT 2007? http://www.echosvoice.com/2007...Table link documentation
I am having trouble trying to locate A/P check data that has project related
costs. I found the check data but it is does not indicate the projects, I
found the project data but can not determine thye logical link between the
two tables, I may be using the wrong tables the tables I am using are PM80500
and PA31102. Is there any documentation of how all the tables in the system
are logically link. I am trying to write reports in MS Access, but there
are 1500+ tables in GP (version 10)
In an effort to find the correct table you can do a number of things (believe
me I do)....need help to declard type=IntType instead type="xsd:int" with xml schema
I am writing C# code to produce xml schema.
XmlSchemaAttribute att2 = new XmlSchemaAttribute();
att2.Name = "CustomerID";
att2.SchemaTypeName = new XmlQualifiedName("int",schemaNS);
att2.Use = XmlSchemaUse.Required;
I need to produce schema with custom data type instead of the
xsd:string or xsd:int
The code above will produce the following schema
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema attributeFormDefault="unqualified" version="1.0"
xmlns:xsd=...Refreshing a pivot table #2
I have posted this question before but didn't get any replies so am trying
again in the hope that somebody knows the answer.....!!
When using a pivot table, is it possible to refresh only certain columns
rather than the whole table??
Any urgent help would be appreciated.
You can't refresh only part of a pivot table.
Perhaps you could make a copy of the source data, change only the data
you want updated in the pivot table, and base the pivot table on that.
> I have posted this question before but didn't get any replies so am trying
> ...Scatterplots with different colors based on Type of Data
Is it possible to plot a scatterplot with different colors for 2 sets of data?
E.g Type of Agreement MRP Discount%
Limited 10 5%
UnLimited 20 10%
I want to show different colors for Limited & Unlimited.
Is it possible to plot scatterplots on both axis(Primary & Secondary)
Please let me know.
If I use this range to make a chart
Limited 10 5%
Unlimited ...neededing to make text pivot table if possible
I need to look at my employees names & the job they did on each
particular day. Maybe something similar to the pivot table could help.
Something that I could pull one persons name and every date & the job
they did I could easily see. Or I could pull the job title and I could
see the data that way. Is there a way to put this information into the
spreadsheet in a certain way where some formula can help me??
Message posted from http://www.ExcelForum.com/
If you show how your data is set out it may help to advise you.
If you're staring from scratch, I'd make sure th...insert, append from form to table
I have a form bound to a query made up of several tables, and to try and
speed things up, I am using unbound combos (sourced by lookup tables), and
running append queries before exiting the form, after all of the fields are
filled in. This works fine for completely new records, but what do I do if I
would like to change existing ones?
I tried to run update queries from
If Me.[form_cbo_box_name] <> Me.[txt_field_from_main_query] Then
but it won't fire.
I need to find out if the combo has changed, and update it if it has, append
it if it was formerly blank, and ignore it i...outlook type interface
I have an SDI application and want to change it so I have a split window, on
the left I want a TreeControl above a 'PropertyGrid' control. Then my
exisiting SDI Client in the space on the right
Can anyone point in the right direction to achieve this
Any help will be much appreciated
You need to use two CSplitterWnds (as members of your CMainFrame).
Override CMainFrame::OnCreateClient and create a vertical splitter as
the main child (i.e. 1 row, 2 cols). Then you want to create a horz
splitter as a child of the left-hand pane of the main splitter (which
has 2 rows, 1 c...VSTO Excel 2003 to VB 6.0 Type mismatch
I have an Addin 2003 Application. In this Application I'm calling an VB 6.0
Dll and I send Excel Application Object as Parameter. In VB Project I'm using
Workbook_Open event with WithEvents. I have a messagebox there. Unfortunately
when i call VB dll , I get this Error Message -- > Type mismatch.
Is there any Idea?
Code in VS2008 :
private Project1.Class1 vbapp;
private void ThisAddIn_Startup(object sender, System.EventArgs e)
#region VSTO generated code
(Excel.Application)Microsoft....predictive typing of addressee
I am frequently sending sensitive email to a person who
has a very common name.
More than once I have almost sent the email to the wrong
party because of the Outlook feature that predicts the
Does anyone know how to eliminate names from the dropdown
list that appears as you type tha addressee name?
Or is there a way to stop addressee names from appearing
automatically as you type in the "To" field.
Any help will be appreciated.
Use arrow keys to highlight error address, then hit Delete Btn
Do you use Contacts?, hitting the 'To' Btn will bri..."Can't change data type" error
I'm trying to reduce the field size of text fields in my database. They
defaulted to 255 characters when I created my database but in many cases I
only need a size of around 20. When I enter the reduced size for one field
in the table design view and try to save the change to that field I get the
"Microsoft Access can't change the data type. There isn't enough diskspace
When I click OK to the above I then get the following message:
"Errors were encountered durnig the save operation. Data types were not
changed. Properties w...How to convert CString type to LPCSTR type
I have a CString type variable, and I need to convert it's to LPCSTR
type ,what I can do!
next I want to call WinExec Command to execute this file
LPCSTR lpcstr ;
lpcstr = m_strExecFile.GetBuffer();
BUT the compilier tells me it can not convert w_char * to LPCSTR type!
ps. I use vs2005 program in UNICODE mode.
Any helpful ideas would be highly appreciated!
Why use a CString in this case at all, if all you are doing is using it in
WinExec. Something ...Remove a table from partitions
SQL 2005 64 bit EE
I have a large database with several partitions and lots of data. One of
the tables that is across the partitions I'd like to move to a new file
group outside the partition file groups. IOW - I don't want this table
To get this table on a file group not a part of the partition scheme, is it
as simple as rebuilding the clustered index on the new (non-partition)
On Thu, 1 Jul 2010 13:51:53 -0400, "cw" <email@example.com> wrote:
>SQL 2005 64 bit EE
>I have a large database with several part...Console to Dialog
I'm trying to port a console based app to a dialog based app so that I
can have access to gui controls. The console app connects to a remote
server and process the data from the server through a dll. It does this
by starting a thread which begins a session and handles the incoming
data with callback functions.
I tried porting by creating a regular dialog app with a button control
that would start the main thread of the console app which I created a
class for. I took out all references of creating or messaging the
console window, so just the session/callback code remained. The dialog
crash...Project and Canadian Payroll Table References to SQL
I have and Excel mapping of GP tables to the SQL physical tables, which I
find very helpful. However, I don't have the same for two key modules that
we use: Project and Canadian Payroll.
Does anybody have these to share?
Don't have a system in front of me to check with, but the Canadian
Payroll tables all start with CPY. You can print all of the details
using Resources > Tables and selecting Canadian Payroll as your product
and Project as the series.
> I have and Excel mapping of GP tables to the SQL physical tables,
> which I find very helpf...