|
no one can help me ?
i need direction... something....
|
|
|
|
|
Don't have a real specific answer for you. Techniques for creating serial numbers for your product is something many companies do not divulge how they do it.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi friends,
I have a two columns as unitprice and quantity in salesreport table. I am constructing new column by multplying this two column. I gave the name of sales for this new column. I want to ge average of sales column.
I tried below code but program says the column name of sales is invalid.
select unitprice,quantity,unitprice*quantitiy as sales from salesreport
where sales>avg(sales)
|
|
|
|
|
I think you have to change the structure of your query a bit in order to get the results you would like.
First off, Sales is a calculated column, so if you would like to filter by that value, you will have to filter using the calculation instead of the alias you give to that calculation.
Secondly, to get the average sales, you'll have to include a sub-query in your where clause that will calculate the average. This subquery will then be used to compare values against to determine if it meets the criteria in your where clause
Your query should look similar to:
<br />
select <br />
unitprice,<br />
quantity,<br />
unitprice * quantitiy as sales <br />
from<br />
salesreport<br />
where <br />
(unitprice * quantitiy) > (select avg(unitprice * quantitiy) from salesreport)<br />
|
|
|
|
|
Thanks so much for your quick and detailed response but i have another problem. First of all i wonder why we can't write avg(sales) instead of avg(unitprice * quantitiy).
I am working with nortwind sample.
I have the column sum("order details".unitprice*quantity*(1-discount)) as totalsales
(I don't write all all code, if it is not clear what I want , i can write all my code trying.)
as accumulated new column. I want to get average of this.and I used group by function also. I wrote avg(sum("order details".unitprice*quantity*(1-discount)) ) .Program says you can not sum in....)
|
|
|
|
|
I used below code series and I got "An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference."
error.
select employees.Firstname,employees.lastname,orders.OrderID,
sum("order details".unitprice*quantity*(1-discount)) as Sales from (Employees inner join orders on employees.employeeID=orders.employeeID) inner join "order details" on orders.orderID="order details".orderID
where sum("order details".unitprice*quantity*(1-discount))>(select avg(sum("order details".unitprice*quantity*(1-discount))) from "order details")
group by employees.lastname,orders.orderID,employees.firstname
|
|
|
|
|
Hello, I've done quite a bit of work in customizing a version of the property grid to meet my needs and have found some great references here on code project for doing so. However, there are a few things I haven't found a great way to do yet and I figured it couldn't hurt to ask around. Anyway:
1. I'd like to be able to create a button in a property grid control. Basically, I'm using the property grid to allow users to edit a bunch of data, and would like to be able to add a "Render" button to the control. I realize I could create a button on the form that contains the property grid, but that violates my whole reason for using the property grid - that one property grid can be the editing framework for many objects.
2. I'd love to override the handling of certain types in the property grid to provide custom controls - like a slider or numeric up down for a range limited value, for instance. However, it doesn't seem like I can do this without requiring the user to open a custom control embedded into the property grid (pressing the ... button), which is clunkier than I'd like. I suppose this goes along with question #1 to some extent, as if I could draw and manage that area I could build my own button control.
Any help is appreciated..
|
|
|
|
|
anyone with tutorials on image surveillance specifically face recognition, please send it down here please
tony-yeyo
|
|
|
|
|
you should post a question in one CP forum only. Those are the rules.
|
|
|
|
|
|
Try doing a general search on this site.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
how can i get the reference of existing(opened) form and manipulate its control properties like text,Visable etc on other form or within module? by doing new myForm does give reference of new instance rather existing one. Also, is there some different method to get instance in case of MDI application?
Would be greatful if I get some urgent response.
|
|
|
|
|
You're back! Has your tinpot dictator opened up the Internet tubes again?
Adnan Siddiqi wrote: by doing new myForm does give reference of new instance rather existing one.
Umm, yes. When you create the form initially, you store it in a reference. YourForm form = new YourForm(); Then you can use the form reference.
Here[^] is something for you.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
Vikram A Punathambekar wrote: You're back! Has your tinpot dictator opened up the Internet tubes again?
It was never closed at all. I used to visit CP for two reasons, one was SoapBox other was looking for MS related stuff. I am not basically a .NET/Microsoft programmer but was FORCED to work on an application which was based on COM technology so had to work on it anyway.
Vikram A Punathambekar wrote: Umm, yes. When you create the form initially, you store it in a reference. YourForm form = new YourForm();
WOUld take a look on your mentioned links
Thanks
/A
|
|
|
|
|
Adnan Siddiqi wrote: how can i get the reference of existing(opened) form and manipulate its control properties like text,Visable etc on other form or within module? by doing new myForm does give reference of new instance rather existing one. Also, is there some different method to get instance in case of MDI application?
After 2000 posts I think you should know enough to not cross post.
1. Beside from MDI control, you can do that by first managing the form by yourself, ie have a form manager class.
2. New (<---) create a new instance of form.
|
|
|
|
|
I know but the reason I did because I just needed a .NET based solution regardless of technology(c#,vb.net) because I don't have much time.
I admit my mistake but had no choice
|
|
|
|
|
Is there a way that i can create a Serializer Similiar to the XmlSerializer. the data that i am working with is kinda like a hash file. I would like to be able to stick some attributes to my objects/properties and serialize the hashed data to workable objects and back into formatted data. Could someone point me in the right direction?
Thanks!
Don't be overcome by evil, but overcome evil with good
modified on Wednesday, December 26, 2007 10:51:03 AM
|
|
|
|
|
You can implement the ISerializable interface on your class and handle the serialization events
only two letters away from being an asset
|
|
|
|
|
Hey Mark, Thanks for your reply. Looking at the ISerializable i don't think i am able to use this. The kind of data that i am working with is a pipe delemited file (ex Adam|1550 Robin St. Tampa, FL). What i'd like to do is take this string and add it to a "Customer Object" so i can just manipulate the data using the properties. Then when i am done w/ i'll then be able to serialize it in the original format. ISerializable Interface uses the SerializtionInfo which gets/adds data by keys and i can't store the keys in this data.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Unless I'm missing something you're not saying. The file is already the serialized representation of your objects.
only two letters away from being an asset
|
|
|
|
|
I don't know how to explain it man. I'll try and figure something out. Thank you for your time.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Hi,
Is there any module available (Open Source/Buy) which can do a Diebold 912 Message parsing and formatting. Sends the message as byte stream to a IP or Port. Some thing similar as JPOS for 8583.
|
|
|
|
|
Not sure.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Paul Conrad wrote: Not sure.
i couldnt get you
|
|
|
|
|
Not sure if there is one. Might try google?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|