How to count and calculate total percentage for field

hi all,
i have two tables as follow:
i have a inner join as follow :
SELECT distinct dbo.Motor_Story.Name, dbo.Goods.kala, dbo.Goods.type, dbo.Goods.id_story FROM 
dbo.Goods INNER JOIN dbo.Motor_Story ON dbo.Goods.id_story = dbo.Motor_Story.Id
I have the following data are entered
in my database,
type
kala
no
Panaconic                       
Monitor
1
Sony                            
Telvision
2
Samsung                         
Phone
3
Vaio                            
Computer
4
Panaconic                       
Monitor
5
Sony                            
Telvision
6
Panaconic                       
Phone
7
Panaconic                       
Printer
8
Sony                            
Computer
9
Panaconic                       
Monitor
10
Sony                            
Telvision
11
Samsung                         
Phone
12
Panaconic                       
Printer
13
i want create a view so that, count 'dbo.Goods.type' and calculate total percentage of ' dbo.Goods.type, than other products based on 'dbo.Goods.kala'.
pls hlp me.
best regards.

Hi,
Welcome to MSDN.
I am afraid this is not the proper forum for this issue, since it is not a specific vb.net issue.
I would suggest you consider posting this issue in sql forum for more dedicated support.
http://social.msdn.microsoft.com/Forums/en-US/home?category=sqlserver
Thanks for your understanding.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How do u get the battery percentage for the iPod touch 5g

    How do u get the battery percentage for iPod touch 5g

    http://modmyi.com/forums/ipod-themes/816715-add-battery-percentage-ipod-touch-5t h-generation-ios-6-without-jailbreaking.html
    Note that % battery on an iPod is not accurate. you will see large fluctuation in % battery and that is normal/expected.

  • How to open and close posting period for both material  , n invoicing

    HI
    how to open and close posting period for both material  , n invoicing , AM NEW TO SD , SO ALL DOUBTS I DO POST IN HERE PLEASE DONT MIND

    Hi Sunaina
    Period Open T.code: MMP1
    Period Close T-Code: MMPV
    Automate the opening of MM periods 
    How can you automate the monthly opening of MM periods (transaction MMPV - program RMMMPERI) with 
    SM36?
    RMMMPERI accepts a period/year or a date.
    If you enter a date the period is derived by it.
    1. create a variant and check the attribute 'selection variable' for the parameter date. Then click the button 'Selection variables' and set the current date. Every time this variant is used the parameter DATE is filled with the current date.
    2. create a job for RMMMPERI with the variant created in the preceding step. Set it as periodic.
    If you're not using a fiscal year variant simply schedule it as monthly (to be executed the first day of the month).
    If you are using a fiscal year variant you'd have to define a calendar with only the first day of each period defined as working 
    day and use it in the periodicity restrictions.
    Another possibility:
    Write a very simple ABAP which run daily to check if the period has changed and submit RMMMPERI.
    Reward if useful to u

  • How to find and install right java for ECC6 intstallation on AIX5.3

    Hello
    I wander how to find and install right java for ECC6 intstallation on AIX5.3. I went thruroughly thru note 723909 and underlying 716927, 1008311 and 1039948 notes but I still do not understand.
    I guess I should logon to IBM site http://www.ibm.com/developerworks/java/jdk/aix/service.html
    where I can choose :
    " Java 1.4.2 64-bit "
    and then :
    "64-bit SDK 1.4.2 base images (at 1.4.2.0 level; in installp format) "->"Base SDK (required)
    Java14_64.sdk.tar  ((50001920)
    then I assume (on AIX ) I should "tar xvf Java14_64.sdk.tar".
    then I get extracted "Java14_64.sdk"
    Is this ok?
    I know on Linux(
    from IBM site I downloaded "IBMJava2-amd64-142.rpm"
    then I issued
    "rpm -i IBMJava2-amd64-142.rpm "
    and finally issued
    "export JAVA_HOME=/opt/IBMJava2-amd64-142")
    What in case of AIX5.3? Could you help me?

    I was told to use smitty (just I am not familiar with it). furdermore i do not hace read.me file. the ziped files are:
    Java14_64.ext
    -rw-rr 1  202 bin    371712 Mar  2  2010 Java14_64.license
    -rw-rr 1  202 bin      3072 Mar  2  2010 Java14_64.msg.ja_JP
    -rw-rr 1  202 bin      3072 Mar  2  2010 Java14_64.msg.Ja_JP
    -rw-rr 1  202 bin      3072 Mar  2  2010 Java14_64.msg.ko_KR
    -rw-rr 1  202 bin      3072 Mar  2  2010 Java14_64.msg.zh_CN
    -rw-rr 1  202 bin      3072 Mar  2  2010 Java14_64.msg.Zh_CN
    -rw-rr 1  202 bin      3072 Mar  2  2010 Java14_64.msg.zh_TW
    -rw-rr 1  202 bin      3072 Mar  2  2010 Java14_64.msg.Zh_TW
    -rw-rr 1  202 bin   4888576 Mar  2  2010 Java14_64.samples
    -rw-r----- 1 root root 67190784 Oct  4 09:53 Java14_64.sdk
    -rw-rr 1 root root 77370639 Nov 20 19:36 Java14_64.sdk.tar.gz
    -rw-r----- 1 root root 12612608 Oct  4 09:53 Java14_64.source

  • How to  get and download adobe illustrtor for iMac os x 10.7

    how to  get and download adobe illustrtor for iMac os x 10.7    

    www.adobe.com would be a good place to start. You can also visit Apple's Online Store to see if you can order from there. Google search for other vendors.

  • How To Install and Configure External Drivers for the JDBC & JMS Adapters

    Hello colleagues,
    Please I need a How To Install and Configure External Drivers for the JDBC & JMS Adapters version 7.10.
    VERSION 7.10.
    BBDD ORACLE - ojdbc14.jar
    Regards.

    Hi ,
    Uisng  Java Support Package Manager (JSPM) to deploy com.sap.aii.adapter.lib.sda file,
    refer this two links,the procedure available how to deploy using JSPM.
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/33/e6fb40f17af66fe10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/1f/c45b4211aac353e10000000a1550b0/frameset.htm
    Regards,
    Raj

  • How To Install and Configure External Drivers for JDBC & JMS Adapters"

    hello ,
    where can i download  this Guide "How To Install and Configure External Drivers for JDBC & JMS Adapters"?
    thanks
    best regards
    pietro greco

    Hi Eleonore Rosenthal, 
    Could you please check the below links:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/33/e6fb40f17af66fe10000000a1550b0/content.htm
    http://help.sap.com/saphelp_sm32/helpdata/en/33/e6fb40f17af66fe10000000a1550b0/frameset.htm
    Regards,
    S.Manu.

  • How to Download and Use HP iPrint for Android, iPhone, and iPod Touch

    Greetings iPrint users!
    The following documents contain instructions for downloading the iPrint Application and use the app to print photos.
    Included on each page are step-by-step instructions with screen shots, as well as a video walkthrough.
    iPhone and iPod Touch Users
    How to Download and Use HP iPrint for iPhone and iPod Touch
    Android Users
    How to Download and Use HP iPrint for Android
    Happy Printing
    I am an HP Employee
    Click the KUDOS Star to say "Thanks"
    Please mark the post that solves your problem as "Accepted Solution"

    Hi nstav,
    I'm sorry that you are having problems finding the app to print from your iPad to your Photosmart Premium C309a.
    The app you are looking for is HP's ePrint Mobile app.  You can find it in the Apple App Store or iTunes.  I have included a link to a document about getting started with the app.  I have also included an FAQ document for the app.
    Getting Started with HP ePrint Mobile Apps
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&dlc=en&docname=c01616126
    HP ePrint Mobile App FAQs
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&dlc=en&docname=c01923321
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • How to manage and prevent database lock for database admin and development

    how to manage and prevent database lock for database admin and development
    [email protected]

    Hi,
    can someone advise me some good book or even better a PDF or a white paper on the Web where it's explained well how to design and manage a relational database (that is normal forms, tuning, design, implemantation...)?
    I've been working on Oracle databases for a few years as pl sql programmer, but I'd like to read something describing well the relational database theory, because I've been asked to work as database designer.There are many books available in the market, please go through this link -- http://www.amazon.com/gp/bestsellers/books/549646/ref=pd_ts_b_nav
    I've been told to read "Fundamentals of Database Systems" by Ramez Elmasri, but I ask here for some more advices.I would strongly recommend reading this book, it was my best reference during my college study and even after starting my DBA career.
    Thanks,
    Hussein

  • How to find and replace data in form fields in acrobat xi, its not allowing to do so while trying, a

    how to find and replace data in form fields in acrobat xi, its not allowing to do so while trying, asking for adobe livecycle to get installed. please help.

    Easiest way to do it is the following:
    - Open the PDF file in Acrobat.
    - Go to Tools - Forms - More Form Options - Export Data.
    - Save the form data as an XML file somewhere on your system.
    - Open XML the file in a plain-text editor (I recommend Notepad++).
    - Let's say you want to replace all the years in the dates from "2013" to "2014". Do a global Search&Replace of "2013-" to "2014-" (I added the dash just to make sure that only date fields are edited).
    - Save the XML file (maybe under a new name).
    - Go back to the PDF file, and now go to Tools - Forms - More Form Options - Import Data.
    - Select the edited XML file and import it.
    - Done!

  • Query to display data monthwise and calculate total for first 12 months

    Hi All,
    I have a query that displays forecast data monthwise.
    This has been achieved by adding 0CALMONTH on top of key figure structure.
    Eg: -
                            APR 2011   MAY 2011    JUNE 2011   ....... NOV 2013
                            Forecast      Forecast       Forecast             Forecast
    PRODUCT 1      10                15                    20                         25 
    Now there is a requirement to include new column that displays total of first 12 months data only.
    How can I achieve this without repeating the total value for every value of 0CALMONTH?
    Eg: -
                            APR 2011   MAY 2011    JUNE 2011   .......  MAR 2011    TOTAL of     APR 2012  .......       NOV 2013
                            Forecast      Forecast       Forecast             Forecast        12 months    Forecast                   Forecast
    PRODUCT 1      10                15                    20                         25               300              10                              30
    Any inputs will be appreciated.
    Thanks & Regards
    Manisha

    Hi,
    As far as i understand your requirement is to make a new keyfigure which has to be total of 12 months and that keyfigure should not get splitted based on calmonth which you have kept above the key figure structure in columns.
    I dont think it will be possible to achieve it that way.You need to make a fixed structure which will dispaly data for say next 12 months or whatever your user requirement is and you need to make a seperate  keyfigure with month offsets and then you can make  a seperate total keyfigure(of 12 months).
    With the help of text variable type replacement path you can get the seperate month names for all your forecasted keyfigures.
    I had the same requirement but my user wanted to see the next six months data only so i made it with the help of month offsets.
    If you get any other work around to achieve your requirement then please do share the solution with us.
    Hope it helps.
    Regards,
    AL
    Edited by: AL1112 on Sep 6, 2011 9:34 AM

  • How to create a running total formula for different calendar years

    Hello everyone,
    I am looking for some help in creating a running total formula for different calendar years in Oracle. This is what I currently have organized in the crosstab report: vertically I have the cities from our database organized, then horizontially have the following information for each city:
    2006 /2007 /2008
    Amount /Amount Spent /Unspent Amount Amount Recieved/Amount Spent /Unspent Amount Amount Recieved/Amount Spent/Unspent Amount
    Recieved
    I am trying to create a formula that will specify each calendar year. For example, I'd like to have a formula in 2007 which would total the: 2007= {2006 unspent amount + the unspent amount in 2007} and same for 2008= {2007 unspent amount + the unspent amount in 2008}. I hope this is clear, I have simplified the report into a basic interpretation of what i've been trying to accomplish.
    Would anybody know if this is possible and how to approach this?
    Really appreciate it! Thanks.
    Alex

    Hi,
    you can try and define a running total as a calculation in the crosstab as:
    sum(Unspent Amount) over (partition by city order by year)
    i find the crosstab format comfusing sometime since the aggregation is auto applied.
    I would start with a flat table and then "duplicate is as a cross tab"
    for your running total you can sort the data by the city,year and get it to 3 lines for each city, for example:
    city year Unspent Amount all other amount...
    X 2007 10
    X 2008 20
    X 2009 30
    Y 2007 5
    Y 2008 15
    Y 2009 25
    then you can use a funtion to calculate the amount :
    sum(Unspent Amount) over (partition by city order by year)
    this is the sql i used just to check it:
    SELECT city,year,"Unspent Amount"
    ,SUM("Unspent Amount") over (PARTITION BY city ORDER BY YEAR)
    FROM (
    SELECT 'X' city, 2007 YEAR, 10 "Unspent Amount" FROM dual UNION ALL
    SELECT 'X', 2008 ,20 FROM dual UNION ALL
    SELECT 'X', 2009 , 30 FROM dual UNION ALL
    SELECT 'Y', 2007 , 5 FROM dual UNION ALL
    SELECT 'Y', 2008 , 15 FROM dual UNION ALL
    SELECT 'Y', 2009 , 25 FROM dual
    Tamir

  • Use Windows PowerShell to count and list total number of items in Folders E-Mail in Office Outlook?

    I have the need to generate a list of all outlook folders and the total number of items listed beside each folder name. I thought I could simply modify the script from " http://blogs.technet.com/b/heyscriptingguy/archive/2009/01/26/how-do-i-use-windows-powershell-to-work-with-junk-e-mail-in-office-outlook.aspx
    " regarding the total number of items in the junk folder but no luck.
    I thought I could just simply duplicate line 6 of the aforementioned script
    "$folder = $namespace.getDefaultFolder($olFolders::olFolderJunk) " and change the folder name but getting the "Method invocation failed because [Microsoft.Office.Interop.Outlook.OlDefaultFolders] does not contain a method
    named 'olFolder'.
    At line:7 char:1
    + $folder = $namespace.getCurrentFolder($olFolders::olFolder("Design Engineering S ...
    I've found a way to export a list of all these folders using exportoutlookfolders.vbs to a txt file but doesn't include total number of items.
    Looking for any pointers on how to make this work. Don't expect anyone to write it for me but I am still learning PS. Would be great to find a way to import all of these folder and subfolder names into the script. Will be appreciative of any advice though.
    There's an enormous amount of Outlook folders.
    Outlook 2013
    Windows 8
    Thanks,
    Barry

    Since I am not and administrator, but an end user, I do not have access to the Get-Mailxxxx commandlets to make this really easy and had to do this long hand.
      The following will pull folder.name, folder.items.count, and sum the total size of each folder's items for all folders and their subs. 
    Just one warning, the summation can take some time with a large PST file since it needs to read every email in the PST. 
    There is also some minor formatting added to make the results a little more readable.
    $o
    = new-object
    -comobject outlook.application 
    $n
    = $o.GetNamespace("MAPI") 
    $f
    = $n.GetDefaultFolder(6).Parent 
    $i
    = 0
    $folder
    = $f
    # Create a function that can be used and then re used to find your folders
    Function
    Get-Folders()
    {Param($folder)
     foreach($folder
    in $folder.Folders)   
    {$Size =
    0
    $Itemcount
    = 0
    $foldername
    = $folder.name
    #Pull the number of items in the folder
    $folderItemCount
    = $folder.items.count
    #Sum the item (email) sizes up to give the total size of the folder
    foreach ($item
    in $folder.Items)
    {$Itemcount
    = $Itemcount
    + 1
    $Size =
    $Size +
    $item.size
    Write-Progress -Activity ("Toting size of "
    + $foldername
    + " folder.")
    -Status ("Totaling size of "
    + $Itemcount
    + " of "
    + $folderItemCount
    + " emails.")
    -PercentComplete ($itemcount/$folderItemCount*100)
    # just a little formating of the folder name for ease of display
    While($foldername.length
    -le 19){$foldername
    = $foldername
    + " "}
    #Write the results to the window
    Write-Host ("-folder "
    + $foldername
    + "  
    -itemcount " +
    "{0,7:N0}" -f
    $folderItemCount +
    "   -size " +
    "{0,8:N0}" -f ($size/1024)
    + " KB")
    #If the folder has a sub folder then loop threw the Get-Folders function.
    #This two lines of code is what allows you to find all sub folders, and
    #sub sub folders, and sub sub sub for as many times as is needed.
    If($folder.folders.count
    -gt 0)
    {Get-Folders($folder)}
    get-folders($folder)

  • How Revenue Recognition value calculate in VF45 for an item

    Hello Experts,
    I want to know how system calculates Revenue Recognition for any item in VF45. I know the configuration part of Revenue Recognition but want to know the calculation part, how calculation going to find out the vale of the Revenue recognition.
    Item net price is 3139255.45 and system calculate Revenue recognition for this item is  3139020.94.
    I want to know how calculation going for Revenue recognition.
    Can any body help me out ? any link /document related to Revenue Recognition Calculation (not configuration)  please share with me.
    Thanks,

    Hello Prasanth,
    For example :- Maintaining an annual Price  ZPRC - 1200  and Billing plan is Annual
    So, while recognising SAP takes 1200 / 365(Number of days) =  3.287 per day
    For jan - 31 days - 31*3.287 =101.91
    For feb - 28 days - 28*3.287 = 92.05
    Thank you for your time.

  • How do u calculate total of a field in forms

    how do u calculate the total of a field in forms which u are entering and then compare it with a particulat amount so that it is not more than that amount.
    Message was edited by:
    user521989

    I tried using this query, (it is just an example). in the 'key-next-item-trigger'.....but it takes directly from the database , i want it to take the values that i enter in the form and total those values, but like i said it takes all the stored values from the database and then totals it. could you suggest something
    post;
         declare
         x number:=0;     
         begin
         select sum(salary) into x from dept;
              message(x); pause;
         IF x > 5000 THEN
              message('cannot be greater than 5000');
              raise form_trigger_failure;
         end if;
         end;

Maybe you are looking for

  • How to enable fnd log in self service page

    Hello, In professional forms, we can enable fnd log using the profile options "FND: Debug Log Enabled" to Yes and "FND: Debug Log Level" to different levels. Similarly, can we do the same with Self Service page? how and where can i see the log result

  • RESTful schedule instance ID do not match with instance PID in CMC Instance details

    SAP BO 4.1 sp1 I'm using the RESTful Web Service API to schedule a Webi report with the following API: http://<server>:<port>/biprws/infostore/<documentId>/scheduleForms/now In the response, I get the Location in order to retrieve the scheduled resou

  • Script to align selected objects to artboard

    Hello, I was wondering if anyone had a simple solution to aligning selected items to the artboard. I was going to create an action but then realized it would be more convenient for me to include it in my script file....I have a script to align object

  • Major problems with new update

    so I updated my iPod about a week ago and ever since I cannot sign onto aim nor can I chat through facebook. Is anyone else having these problems? What can I do about them?

  • Compressor (Audio Filter) at Final Cut Pro.

    At Logic I used to use the filter Compressor to limit audio tracks(like soundtracks) while I needed emphasize another audio (interviews,for instance). I saw at Final Cut audio filters a filter called "Compressor / Limiter". I am not environmentalized