I don't think he wants to return a Value of 'Tuesday', he wants to return the value of the column NAMED Tuesday.
So instead of SELECT Tuesday FROM inventoryRoom WHERE inventoryid='1'; He's trying to specify the Tuesday column with DAYNAME('2004-03-23'); I have no idea if that's possible. -----Original Message----- From: tweewan.wong [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 10:27 PM To: [EMAIL PROTECTED] Subject: RE: Selecting a Column Not sure why you don't get "Tuesday". At my place ( I am using 5.1 beta version). It did return "Tuesday" for this statement SELECT DAYNAME('2004-03-23'). Anyway, I can get similar output by using select date_format('2004-3-23','%W'). -----Original Message----- From: Ligaya Turmelle [mailto:[EMAIL PROTECTED] Sent: 24 March 2004 09:33 To: [EMAIL PROTECTED] Subject: Re: Selecting a Column So what are you asking? I'm confused. Are you asking just to get 'Tuesday'? (SELECT DAYNAME('2004-03-23');) The value of Tuesday where inventoryid = 1? (SELECT DAYNAME('2004-03-23') FROM inventoryRoom WHERE inventoryid='1'; which you already had.) Or all the values in Tuesday? (SELECT DAYNAME('2004-03-23') FROM inventoryRoom;) Please clarify. Respectfully, Ligaya Turmelle ""Yoed Anis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a table that looks like this: > CREATE TABLE inventory ( > inventoryid int(11) NOT NULL, > sunday int(3), > monday int(3), > tuesday int(3), > wednesday int(3), > thursday int(3), > friday int(3), > saturday int(3), > PRIMARY KEY (inventoryid) > ); > > And I'm trying to run a command like > > SELECT DAYNAME('2004-03-23') FROM inventoryRoom WHERE inventoryid='1'; > > That doesn't return "Tuesday", but the value in the column Tuesday, an > int of value 10. > > I need something like > SELECT COLUMN(DAYNAME('2004-03-23')) FROM inventoryRoom WHERE > inventoryid='1'; > > But I don't know what command I'm looking for and all my searchs have > come up fruitless. > Plz CC this to my address if you reply. > > Thanks, > Yoed > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]