actually i have five columns like system,name,qty,weight,area
I have to fetch the details from database. I have to write a query where i have to multiply qty and weight and put it in weight column and at the same time i have to display the records in the descending order of total weight . How can this be done. Please help
We know the ALTER TABLE ADD <columnname> adds the column on the end of the table. There have been posts about how to add it in the middle, and people agree it can't be done easily, and doesn't need to be done.
The application doesn't care about the order, but...
I am a little pedantic, and like everything neat and tidy. I like my PK first, then my FK's, then some logical group as we move down the table definition. So, when I add a new column that will form a FK, I don't want it on the end.
It looks better on a database diagram, and makes the data easier to read in a select * from ...
That said, am I hanging on to an ideal that I shouldn't be? Is adding a column 3 from the top using EM causing overhead in my DB by copying the table and data, then copying it back?
I am interested in people's opinions on keeping the database logically grouped.
Hi. I am trying to figure out how to write a select statement that will retrieve all entries that have a certian letter combination in. EG: If the user enters "a" it will retrieve all words starting with an "a". if he enters "ad" it will return all words stsrting with "ad" etc. Please advise
I'm facing this problem which i don't know how to solve it.
Can anyone guide me?
I have a list of data in table @tmp1. Format like below. This table consists > 100 rows of data.
PartID PartNumber Yield
866 A100 0.98154735437972429
866 A100 0.9997734994337486
866 A100 0.99168797953964194
868 A200 0.70783730158730163
868 A200 0.99929971988795518
868 A200 0.99889908256880733
When i run this query,
group by partid,partnumber
Error encountered.Error message is "A domain error occurred".
I'm trying to multiply all data from 'Yield' column. That's why i query with
But I suspect convert(float,exp(sum(log(yield)))) is giving the error.
So I tried to change datatype to int or varchar or decimal.
But still cannot be solved.
Pls help me.
Thanks in advance.
I don't think that you can change the storage format. Using Convert function would be better. If your application uses common date format in all areas, consider putting the convert inside a custom function. Use this custom function everywhere.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia
I have a table report which has 10 fields as cols.The last 2 fields come from 2 diffrent subreport, having a single field each. There are also 2 groups in this table. I have to limit the rows by checking each cell in a group is 0. If all the cells have got a 0 then hide the row. I can check for all the cells except the last 2(Subreport).
Since the last 2 cells has only got 2 subreports instead of a textbox, as it is the case for the remaining 8 cells, i don't know how to check for data returning from a subreport. For all the other textboxes i have checked it as ReportItems!textbox1.value=0