Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
The Gaffer
Starting Member
2 Posts |
Posted - 2006-07-17 : 10:18:41
|
Hi All,I'm new to SQL server. Basically, I am trying to make my Access database accessible on line to my users, so I am transfering it into SQL Server and then writing a web site to use the connection to the database.My questions are as follows:1) How can I easily move the structure of the tables (relationships too, but content is not important) from Access into SQL?2) I have the following query in Access which I don't believe will work in SQL because of the Sum funtion... How can I change this to work in SQL?:SELECT DISTINCTROW Player.TeamID, Player.PlayerID, Player.SFD, Sum(Payments.Amount) AS Payment, [SFD]-[Payment] AS DueFROM Player INNER JOIN Payments ON Player.PlayerID = Payments.PlayerIDGROUP BY Player.TeamID, Player.PlayerID, Player.SFD; All help will be greatfully received... thanks"In the face of adversity, I stand on the shoulders of giants..." |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-07-17 : 10:25:49
|
| 2)SELECT Player.TeamID, Player.PlayerID, Player.SFD, Sum(Payments.Amount) AS Payment, [SFD]-Sum(Payments.Amount) AS DueFROM Player INNER JOIN Payments ON Player.PlayerID = Payments.PlayerIDGROUP BY Player.TeamID, Player.PlayerID, Player.SFD;==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
The Gaffer
Starting Member
2 Posts |
Posted - 2006-07-18 : 02:50:05
|
| it keeps saying it doesnt like the sum part though... it highlights it in purple"In the face of adversity, I stand on the shoulders of giants..." |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-07-18 : 03:14:57
|
"it keeps saying it doesnt like the sum part though... it highlights it in purple"What is the error message ? KH |
 |
|
|
|
|
|
|
|