Hi I have run the following Select statement and got a result:
SELECT @LEFT(EPISOD.PRODNR,2)||'-'||@MID(EPISOD.PRODNR,3,2)||'/'||@RIGHT(EPISOD.PRODNR,4) AS Prodnr,EPISOD.EPISODKOD AS Avs,UPPSKICK.UPPSKICKSDATUM AS Datum,BAND.BANDNR AS Matid, PROD.SVENSK AS Titel,@IF(@EXACT(TILLAGGSTYPID,10),'1','') AS Overs, @IF(@EXACT(TILLAGGSTYPID,11),'1','') AS PrgmTxt,BEST.MANUELL AS Man, BEST.OPPEN AS Opp, BEST.DOLD AS Dold,UPPSKICKSRAD.ANMARKNING,ANVANDARE.SIGN,KUND.NAMN AS Kanal
FROM ANVANDARE, UPPSKICK, UPPSKICKSRAD, EPISOD, BAND, PROD, BEST, UTLAGGNING, KUND WHERE
(ANVANDARE.ID = UPPSKICK.ANVANDARID) AND
(UPPSKICK.ID=UPPSKICKSRAD.UPPSKICKSID) AND
(EPISOD.ID = UPPSKICKSRAD.EPISODID) AND
(EPISOD.EPISODKOD = BAND.EPISODKOD) AND
(EPISOD.PRODNR = BAND.PRODNR) AND
(PROD.PRODNR = BAND.PRODNR) AND
(UPPSKICKSRAD.BESTID = BEST.ID) AND
(BEST.ID = UTLAGGNING.BESTID) AND
(BEST.SANDENHET = KUND.ID) AND
(PROD.SVENSK Is Not Null) AND
(ANVANDARE.SIGN='123456') AND
(UPPSKICK.UPPSKICKSDATUM='7/18/2003') AND
(KUND.NAMN='JOEBLOGGS')
ORDER BY EPISOD.PRODNR;
If I add the Line:
CREATE VIEW TestView AS
above the SELECT statement, I get the following error:
ORDER BY EPISOD.PRODNR
^
Error: 00134 SQL CNO ERROR.SQL NOT FOUND LOOKING UP ERROR 00901
Any ideas ?
/Nigel
SELECT @LEFT(EPISOD.PRODNR,2)||'-'||@MID(EPISOD.PRODNR,3,2)||'/'||@RIGHT(EPISOD.PRODNR,4) AS Prodnr,EPISOD.EPISODKOD AS Avs,UPPSKICK.UPPSKICKSDATUM AS Datum,BAND.BANDNR AS Matid, PROD.SVENSK AS Titel,@IF(@EXACT(TILLAGGSTYPID,10),'1','') AS Overs, @IF(@EXACT(TILLAGGSTYPID,11),'1','') AS PrgmTxt,BEST.MANUELL AS Man, BEST.OPPEN AS Opp, BEST.DOLD AS Dold,UPPSKICKSRAD.ANMARKNING,ANVANDARE.SIGN,KUND.NAMN AS Kanal
FROM ANVANDARE, UPPSKICK, UPPSKICKSRAD, EPISOD, BAND, PROD, BEST, UTLAGGNING, KUND WHERE
(ANVANDARE.ID = UPPSKICK.ANVANDARID) AND
(UPPSKICK.ID=UPPSKICKSRAD.UPPSKICKSID) AND
(EPISOD.ID = UPPSKICKSRAD.EPISODID) AND
(EPISOD.EPISODKOD = BAND.EPISODKOD) AND
(EPISOD.PRODNR = BAND.PRODNR) AND
(PROD.PRODNR = BAND.PRODNR) AND
(UPPSKICKSRAD.BESTID = BEST.ID) AND
(BEST.ID = UTLAGGNING.BESTID) AND
(BEST.SANDENHET = KUND.ID) AND
(PROD.SVENSK Is Not Null) AND
(ANVANDARE.SIGN='123456') AND
(UPPSKICK.UPPSKICKSDATUM='7/18/2003') AND
(KUND.NAMN='JOEBLOGGS')
ORDER BY EPISOD.PRODNR;
If I add the Line:
CREATE VIEW TestView AS
above the SELECT statement, I get the following error:
ORDER BY EPISOD.PRODNR
^
Error: 00134 SQL CNO ERROR.SQL NOT FOUND LOOKING UP ERROR 00901
Any ideas ?
/Nigel