473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Help to develop Views from following tables

Gobindap
Hi, am trying to develop a .Net program using MS Sql server
Using calculation in user-end made my application too slow.
So I am trying to make such calculation in server and just call dataTable in use-end
For this I need a sql query that is able to generate following desired View.
Primary information about basic Tables are as follows.
I tried to use different sql builder with no success.


Please help me

Thanking you in advance

I have 4 tables as

Table1 (students_Detail)
Expand|Select|Wrap|Line Numbers
  1. studID      studName    gradeID    address
  2. --------------------------------------
  3. 1    Name1        1    add
  4. 2    Name2        1    add
  5. 3    Name3         2    add
  6. 4    Name4         2    add
  7.  
Table2 (FeeList)
Expand|Select|Wrap|Line Numbers
  1. FeeID   FeeDetail
  2. -----------------
  3. 1    Admission 
  4. 2    Monthly Fee
  5. 3     Vehicle Fee 
  6. 4     Medical Fee
  7.  
Table3 (FeeRate)
Expand|Select|Wrap|Line Numbers
  1. sn    FeeID    gradeID    Rate
  2. 1    1    1    1000
  3. 2    1    2    1200
  4. 3    2    1    1500
  5. 4    2    2    1600
  6. 5    3    1    800
  7. 6    3    2    900
  8.  
  9.  
Table4 (Discount)
Expand|Select|Wrap|Line Numbers
  1. studID    FeeID    DiscPercent
  2. 1    1    100
  3. 1    2    50
  4. 1    3    10
  5. 1    4    50
  6. 2    1    50
  7. 2    2    10
  8.  

Now I need SQL to browse these data as follows
Desired View
Expand|Select|Wrap|Line Numbers
  1. studID    studName    FeeDetail     Total    Discount    NetAmount
  2. ---------------------------------------------------------------------------
  3. 1    Name1        Admission    1000    1000        0
  4. 1    Name1        Montly Fee    1200    600        600
  5. 1    Name1        Vehicle Fee    1500    150        1350
  6. 1    Name1        Medical Fee    1600    800        800
  7. 2    Name2        Admission    1000    500        500
  8. 2    name2        Montly Fee    1200    120        1150
  9. 2    Name2        Vehicle Fee    1500    0        1500
  10. 2    Name2        Medical Fee    1600    0        1600
Attached Files
File Type: txt SQL Question.txt (1,002 Bytes, 185 views)
File Type: xlsx SQL Question.xlsx (9.8 KB, 107 views)
Jul 12 '18 #1
0 2424

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: MB | last post by:
I need to develop a Cold Fusion application using SQL tables, I am not sure how to setup my tables or that this is the optimal way of setting my tables for the application that I am trying top...
4
by: MuZZy | last post by:
Hi, I just wonder if someone can help me with this: I need to create a sql script which will run when user installs/upgrades my app. User may already have the database and tables tructure setup...
5
by: Anon | last post by:
We are attempting to implement security on top of a shrink-wrapped software package and are trying to get row-level security. Here's the scenario: 1. Table dbo.BOOK contains all the information...
9
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with...
0
by: TT (Tom Tempelaere) | last post by:
Hi, I have a project to develop a synoptical board, which is a view on a machine we are making. The view should allow monitoring machines in the field and reflect it's state and activity by...
3
by: steve551979 | last post by:
Hello, I am having some difficulty creating a regular expression for the following string situation in html. I want to find a table that has specific text in it and then extract the html just...
1
donilourdu
by: donilourdu | last post by:
hi every one, I need your help to the following. I was try to set a webpage in IIS for Local. I developed in aspx with C# codes. While running in VB.Net it runs. But while i try to run on IE it...
2
by: megann | last post by:
Hi, My name is Megan and I am 21 and just learning to use Access. I was hoping that someone would be able to help me. My problem is that I have created a database with multiple tables (over 10)...
0
by: sgueder | last post by:
Hi there, hope anybody can help me: I want to create a temporary table, want to fill that table with data and finally I want to use that table as my base-table for running some selects on it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.