all you coders out there
•
8 Mar 2007, 22:15
•
Journals
using C# and MSSQL here's the longest SQL statement i've ever seen.
This is in my project but my teacher did it and i still need to understand it although ofcourse i know what's the result supposed to be
myCommand.CommandText = "SELECT TBLTEMP.clan_name FROM (SELECT Clans.clan_id, Clans.clan_name, Clans.clan_tag, Clans.clan_site, Clans.clan_channel, Clans.clan_country, Clans.clan_password, CupsandClans.cup_id, CupsandClans.clan_id AS Expr1 FROM Clans INNER JOIN CupsandClans ON Clans.clan_id = CupsandClans.clan_id) AS TBLTEMP INNER JOIN Cups ON Cups.cup_id = TBLTEMP.cup_id WHERE cup_name = '" + cmbCupNames.Text + "'";
It's choosing the team names that signed up for a cup btw =D
This is in my project but my teacher did it and i still need to understand it although ofcourse i know what's the result supposed to be
myCommand.CommandText = "SELECT TBLTEMP.clan_name FROM (SELECT Clans.clan_id, Clans.clan_name, Clans.clan_tag, Clans.clan_site, Clans.clan_channel, Clans.clan_country, Clans.clan_password, CupsandClans.cup_id, CupsandClans.clan_id AS Expr1 FROM Clans INNER JOIN CupsandClans ON Clans.clan_id = CupsandClans.clan_id) AS TBLTEMP INNER JOIN Cups ON Cups.cup_id = TBLTEMP.cup_id WHERE cup_name = '" + cmbCupNames.Text + "'";
It's choosing the team names that signed up for a cup btw =D
one statement per row is a good thing to do
AS TBLTEMP INNER JOIN
AS Expr1 FROM Clans INNER JOIN
try to translate this expression, go on a site web and check what mean these expressions
You make cuppages at school btw? xD
Only thing we are doing is making some kind of bankstroker webpage :/
and i decided to make something like clanbase =d
N:N relation between cups and teams represented by a table "Cupsandclans". It's simple inner join between three tables, just wrote really messy and with no formatting.
soz late reply =o