Mysql Error 1248
Contents |
here for a quick overview of the site
Mysql Error Code 1248 Every Derived Table Must Have Its Own Alias
Help Center Detailed answers to any questions you might mysql derived table have Meta Discuss the workings and policies of this site About Us Learn more
Mysql Union
about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users mysql group by Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up MYSQL ERROR 1248 (42000): Every derived table must have its own alias up mysql join vote 4 down vote favorite 1 I cant for the life of me figure out why this is erroring SELECT * FROM SELECT c.city_id, p.prop_ynow_id, p.propertyid, p.prop_add_value, p.name, picture, ifnull(p.address,'') as`location`, ifnull(city,'')as`city`, ifnull(ShortCut,'') as `state`, ifnull(p.zip,'') as `zip`, min(if(pr.minrent = 0,99999999,pr.minrent)) as minrent, max(pr.maxrent) as maxrent, '' as service, hood_id, ifnull(p.phone,'') as `phone`, latitude, longitude, min(CAST(pu.fullBath AS UNSIGNED)) as`minbath`, max(CAST(pu.fullBath AS UNSIGNED)) as`maxbath`, min(CAST(pu.Bed AS UNSIGNED)) as`minbed` , max(CAST(pu.Bed AS UNSIGNED)) as`maxbed`, '' as url, '' as source_id, '' as source_name, '' as addresscode, '' as citycode, '' as ctime, '' as paid, '' as similar_url, '' as created_at, '' as updated_at, '' as city_name, '' as service_listing_id FROM wiki_city_list c join propertyinfo p on c.city_id=p.city join ynow_rentwiki.Property_Unitlayout pu on p.prop_ynow_id=pu.P_Ident join (SELECT CAST(substring_index(if(Rent >0 ,Rent,RentLow),'.',1) AS UNSIGNED) as minrent, CAST(substring_index(if(Rent >0,Rent,Renthigh),'.',1) AS UNSIGNED) as maxrent,PRE_Ident,P_Ident,UNL_Ident,RTY_Ident from
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like http://stackoverflow.com/questions/3363918/mysql-error-1248-42000-every-derived-table-must-have-its-own-alias you, helping each other. Join them; it only takes a minute: Sign up mysql error code 1248 up vote 0 down vote favorite I am getting an error code 1248 and have no idea why. Thanks in advance. select substr(cbt,1,8) day, max((delta_GTP_InDataPktGn+delta_GTP_OutDataPktGn))/900 from ( select a.cbt, a.datetime, a.GTP_InDataPktGn - b.GTP_InDataPktGn as delta_GTP_InDataPktGn, a.GTP_OutDataPktGn - b.GTP_OutDataPktGn as http://stackoverflow.com/questions/17718444/mysql-error-code-1248 delta_GTP_OutDataPktGn from ( select cbt, STR_TO_DATE(substr(cbt,1,12),'%Y%m%d%H%i') as datetime, GTP_InDataPktGn, GTP_OutDataPktGn from sgsn_GTP ) a right join ( select cbt, STR_TO_DATE(substr(cbt,1,12),'%Y%m%d%H%i') as datetime, GTP_InDataPktGn, GTP_OutDataPktGn from sgsn_GTP ) on a.datetime = addtime(b.datetime,"00:15:00") ) z where z.cbt between 20130429000000 and 20130430980000 group by day mysql mysql-error-1248 share|improve this question edited Jul 18 '13 at 8:34 Mahmoud Gamal 56.7k1283111 asked Jul 18 '13 at 8:32 dsaliba 376 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote Error 1248 is ER_DERIVED_MUST_HAVE_ALIAS, "Every derived table must have its own alias". The derived table on the right of your join has no alias: right join ( select cbt, STR_TO_DATE(substr(cbt,1,12),'%Y%m%d%H%i') as datetime, GTP_InDataPktGn, GTP_OutDataPktGn from sgsn_GTP ) -- ^ missing b share|improve this answer answered Jul 18 '13 at 8:40 eggyal 81k1497144 thank you @eggyal –dsaliba Jul 18 '13 at 9:09 thank's @eggyal, You save my time –projo Nov 25 '13 at 8:24 add a comment| Your Answer draft saved draft discarded Sign up o
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have http://dba.stackexchange.com/questions/87136/mysql-error-1248-every-derived-table-must-have-its-own-alias Meta Discuss the workings and policies of this site About Us Learn https://teratail.com/questions/10881 more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database mysql error skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top mysql ERROR 1248: Every derived table must have its own alias up vote 0 down vote favorite mysql error 1248 -- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments before and after the routine body will not be stored by the server -- -------------------------------------------------------------------------------- DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `usp_MissingBooks`(p_UsrID BIGINT , p_Product VARCHAR(20)) BEGIN DECLARE p_LinkedBoard INT; DECLARE p_LinkedSubjects INT; DECLARE p_LinkedClasses INT; DECLARE p_LinkedBoards INT; DECLARE p_SchoolBooks INT; SELECT COUNT(*) INTO p_LinkedBoard FROM userboards WHERE userboards.usrid = p_UsrID; SELECT COUNT(*) INTO p_LinkedClasses FROM userclasses WHERE userclasses.UsrID = p_UsrID; SELECT COUNT(*) INTO p_LinkedSubjects FROM usersubjects WHERE usersubjects.usrid = p_UsrID; SELECT COUNT(*) INTO p_LinkedBoards FROM schoolboards; SELECT COUNT(*) INTO p_SchoolBooks FROM SchoolBooks; Select * From temp_MatchList; CREATE TEMPORARY TABLE temp_MatchList(ID BIGINT , Year INT , Name NVARCHAR(100) , SyllabusDisplayName NVARCHAR(100) , BookType NVARCHAR(20) , ClassName NVARCHAR(20) , ClassID INT , ClassNumber INT , BookName NVARCHAR(100) , Board NVARCHAR(100) , Publisher NVARCHAR(100) , SubjectName NVARCHAR(100) , SubjectID INT , BoardID INT , STATUS CHAR(1) , BoardStatus CHAR(1) ); INSERT INTO temp_MatchList SELECT * FROM ( SELECT vBooksDetails.* FROM ( SELECT DISTINCT * FROM ( SELECT classmaster.ClassID AS ClassID, CDisplayName, subjectmaster.id , SubjectID, s
質問をすることでしか得られない、回答やアドバイスがある。 15分調べてもわからないことは、質問しよう! 質問する ただいまの回答率 92.57% 解決済 ERROR 1248 (42000): Every derived table must have its own aliasのエラーが出る MySQL 2361questions MySQL(マイエスキューエル)は、TCX DataKonsultAB社などが開発するRDBMS(リレーショナルデータベースの管理システム)です。世界で最も人気の高いシステムで、オープンソースで開発されています。MySQLデータベースサーバは、高速性と信頼性があり、Linux、UNIX、Windowsなどの複数のプラットフォームで動作することができます。 Myタグに追加 2015/06/07 19:03 投稿 2015/06/07 19:10 編集 imamoto_browser score 213 2 回答 評価 865 view 0 0 0 selectscores.id,score,deviationfrom(selectscore,deviationfromscoreswherescore>30)unionall(selectscore,deviationfromscoresleftjoinstudentsonscores.id=students.idwherenamelike%suzuki%)asuni; このクエリを実行すると、ERROR1248(42000):Everyderivedtablemusthaveitsownaliasとなります。 修正箇所を教えてください。 クリップ 気になる質問をクリップする クリップした質問に回答があった場合に通知・メールを受け取ることができます。 クリップした質問はマイページの「クリップ」タブからいつでも見ることができます。 Good 良い質問の評価を上げる 以下のような質問は評価を上げましょう。 質問内容が明確 自分も答えを知りたい 質問者以外のユーザにも役立つ 評価が高い質問は、TOPページの「注目」タブのフィードに表示され