STEP 1: status ->SUCCESS
-------
mysql> CREATE TABLE pod_rating select h.he_headend_id 'Cable
Plant',sk.tf_air_date,d.em_dma DMA,d.em_tv_households 'Households
TVs',d.em_us_percent Population,p.tf_title 'Program Name',sk.tf_air_time
Time,st.tf_station_call_sign Network from prog_rec p,stat_rec st,sked_rec
sk,lineup l,headend h,dma d where sk.tf_database_key=p.tf_database_key and
sk.tf_station_num=st.tf_station_num /* and sk.tf_air_date='2001-04-16'*/ and
st.tf_station_num=l.cl_station_num and l.cl_headend_id=h.he_headend_id and
h.he_headend_id='NY31656' and d.em_rank=1 GROUP BY 6,8 ORDER BY 2,8,7;
Query OK, 3918 rows affected (2 min 16.73 sec)
Records: 3918 Duplicates: 0 Warnings: 0
STEP 2: status ->SUCCESS
mysql> desc pod_rating;
+----------------+----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+----------------------+------+-----+---------+-------+
| Cable Plant | char(7) | | | | |
| tf_air_date | date | YES | | NULL | |
| DMA | char(75) | | | | |
| Households TVs | int(11) | | | 0 | |
| Population | decimal(5,3) | YES | | NULL | |
| Program Name | char(120) | | | | |
| Time | smallint(5) unsigned | YES | | NULL | |
| Network | char(10) | YES | | NULL | |
+----------------+----------------------+------+-----+---------+-------+
8 rows in set (0.00 sec)
STEP 3: status ->SUCCESS
mysql> alter table pod_rating change Network Network varchar(15);
Query OK, 3918 rows affected (0.03 sec)
Records: 3918 Duplicates: 0 Warnings: 0
STEP 4: status ->Fail (why???????)
mysql> alter table pod_rating change 'Cable Planet' cable_plant varchar(15);
ERROR 1064: You have an error in your SQL syntax near ''Cable Planet'
cable_plant varchar(15)' at line 1
mysql> alter table pod_rating change "Cable Planet" cable_plant varchar(15);
ERROR 1064: You have an error in your SQL syntax near '"Cable Planet"
cable_plant varchar(15)' at line 1
mysql> alter table pod_rating change Cable Planet cable_plant varchar(15);
ERROR 1064: You have an error in your SQL syntax near 'cable_plant
varchar(15)' at line 1
mysql> alter table pod_rating change Cable Planet cable_plant;
ERROR 1064: You have an error in your SQL syntax near 'cable_plant' at line
1
mysql> alter table pod_rating MODIFY 'Cable Planet' char(10);
ERROR 1064: You have an error in your SQL syntax near ''Cable Planet'
char(10)' at line 1
I am using MySQL version-
mysql> select version();
+-----------+
| version() |
+-----------+
| 3.23.40 |
+-----------+
Question:
1.I have executed these query in MySQL prompt.I got the correct result in
step1,2 and step 3 BUT I am not getting correct result in step 4.Could you
please tell me how to change OR modify "caple planet" ,"Households
TVs","Households TVs" fields.
2.Is this the problem with MySQL or with my query?
Waiting for reply...
Regards,
Abhi
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php