English 中文(简体)
在出入证选择中的先天错误
原标题:Syntax error with select in select in vb to access SQL

我在发言中引用了KQ,在我管理我的节目时,我从一个检索数据库中选择了这个错误。 我认为,这是正确的,但似乎并非如此。 我如何调整这一选择? 该守则如下:

"select distinct(brought_price) as [Price], select sum(brought_qtty) as [Ordinary] from brought_coffee where " & _
"coffee_grade=O, select sum(brought_qtty) as [Premium] from brought_coffee where" & _
"coffee_grade=P, sum(brought_qtty) as [Total Qtty]" & _
", sum(brought_paid) as [paid],  " & _
"sum(brought_bal) as [Balance]" & _
"from brought_coffee, farmer where brought_date=#" & dtc.Text.Trim & "# and farmer_centre= " & cc.Text.Trim & _
"  and farmer.farmer_num=brought_coffee.farmer_num"
问题回答

插图/代码 仅以<代码>sum(brought_qtty)取代。





相关问题
Is Shared ReadOnly lazyloaded?

I was wondering when I write Shared ReadOnly Variable As DataType = New DataType() Or alternatively Shared ReadOnly Variable As New DataType() Is it lazy loaded or as the instance initializes? ...

Entertaining a baby with VB.NET

I would like to write a little application in VB.NET that will detect a baby s cry. How would I get started with such an application?

Choose Enter Rather than Pressing Ok button

I have many fields in the page and the last field is a dropdown with list of values. When I select an item in a dropdown and press Enter, it doesn t do the "Ok". Instead I have to manually click on Ok ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

Hover tooltip on specific words in rich text box?

I m trying to create something like a tooltip suddenly hoovering over the mouse pointer when specific words in the richt text box is hovered over. How can this be done?

热门标签