![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| All: I am trying to create this view in Mysql 4.1.1 and keep getting an error. Here is my create view stanza and the error message I get. Any ideas anyone? mysql> create or replace view otr_titles as -> select title, subtitle, cd_id cd#, -> num_of_episodes episodes, undated_episodes undated, -> start_date startdate, end_date enddate -> from otrcds_by_name otn, otrcds_by_date otd -> where otn.otr_id = otd.otr_id -> order by 1, 3, 2; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or replace view otr_titles as select title, subtitle, cd_id cd n' at line 1 | |||
| Advertisements |
| | #2 | ||
| Keith Lee wrote: > All: > I am trying to create this view in Mysql 4.1.1 and keep getting an > error. Here is my create view stanza and the error message I get. > Any ideas anyone? > > mysql> create or replace view otr_titles as > -> select title, subtitle, cd_id cd#, > -> num_of_episodes episodes, undated_episodes undated, > -> start_date startdate, end_date enddate > -> from otrcds_by_name otn, otrcds_by_date otd > -> where otn.otr_id = otd.otr_id > -> order by 1, 3, 2; > ERROR 1064 (42000): You have an error in your SQL syntax; check the > manual that corresponds to your MySQL server version for the right > syntax to use near 'or replace view otr_titles as select title, > subtitle, cd_id cd n' at line 1 I'm not that proficient with MySQL, but I suspect: cd_id cd# should be cd_id AS 'cd#' AS is not required, but I use normally to keep things clear. I'm not sure how the professionals think about it but I'd suggest: 1. Always use backtick (`) around fieldnames. 2. Always use quotes (') around text. Grtz, -- Rik Wasmus | |||
| | #3 | ||
| "Keith Lee" <cmarvel@NOSPAMnethere.com> schreef in bericht news > All: > I am trying to create this view in Mysql 4.1.1 and keep getting an > error. Here is my create view stanza and the error message I get. Any > ideas anyone? > > mysql> create or replace view otr_titles as > -> select title, subtitle, cd_id cd#, > -> num_of_episodes episodes, undated_episodes undated, > -> start_date startdate, end_date enddate > -> from otrcds_by_name otn, otrcds_by_date otd > -> where otn.otr_id = otd.otr_id > -> order by 1, 3, 2; > ERROR 1064 (42000): You have an error in your SQL syntax; check the manual > that corresponds > to your MySQL server version for the right syntax to use near > 'or replace view otr_titles as select title, subtitle, cd_id cd n' at line > 1 Views in V4??? I thought this was a V5 feature. | |||
| | #4 | ||
| On Fri, 26 May 2006 13:46:50 +0200, spamtoyou wrote: > > "Keith Lee" <cmarvel@NOSPAMnethere.com> schreef in bericht > news >> All: >> I am trying to create this view in Mysql 4.1.1 and keep getting an >> error. Here is my create view stanza and the error message I get. Any >> ideas anyone? >> >> mysql> create or replace view otr_titles as >> -> select title, subtitle, cd_id cd#, >> -> num_of_episodes episodes, undated_episodes undated, >> -> start_date startdate, end_date enddate >> -> from otrcds_by_name otn, otrcds_by_date otd >> -> where otn.otr_id = otd.otr_id >> -> order by 1, 3, 2; >> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual >> that corresponds >> to your MySQL server version for the right syntax to use near >> 'or replace view otr_titles as select title, subtitle, cd_id cd n' at line >> 1 > > Views in V4??? > I thought this was a V5 feature. Where I can get V5 rpms? Keith | |||
| Featured Websites | ||||
|
![]() |
| Tags: problems, view |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows Mail - View only plain text? | Thrane | Windows | 2 | 06-11-2007 5:22 PM |
| View photo stored into CD or DVD | Hervé | Computer Consoles | 2 | 05-30-2007 11:08 PM |
| Motorstorm first person view in-game gameplay | Blig Merk | Computer Consoles | 1 | 05-30-2007 12:34 PM |
| SEO tool - Find out how the spiders view your site | rourkey | Search Engine Optimization | 2 | 05-01-2007 5:59 PM |
| Featured Websites | ||||
|