I need to put current date into additional column title. I mean something like this
SELECT Name_1, ' ' AS CURDATE() FROM Table_1 ...
or, better
SELECT Name_1, ' ' AS CONCAT('My column ', CURDATE()) FROM Table_1 ...
But it doesn't work. AS seems to take only single strings.
Is there any solution?
Thanks in advance.
Marek Kotowski
Warsaw 6 2644 Ma************@wsip.com.pl (Marek Kotowski) wrote in message news:<e5**************************@posting.google. com>... I need to put current date into additional column title. I mean something like this
SELECT Name_1, ' ' AS CURDATE() FROM Table_1 ...
or, better
SELECT Name_1, ' ' AS CONCAT('My column ', CURDATE()) FROM Table_1 ...
But it doesn't work. AS seems to take only single strings. Is there any solution?
Thanks in advance.
Marek Kotowski Warsaw
Try (notice the 'AS' keyword is for making an alternative column name):
SELECT Name_1 AS Alternate_name, NOW() FROM Table_1;
or for formatting:
SELECT Name_1, DATE_FORMAT(NOW(),'%W, %M %D %Y') AS 'Formated date' FROM Table_1;
Read for formatting date: http://www.mysql.com/doc/en/Date_and...functions.html Ma************@wsip.com.pl (Marek Kotowski) wrote in message news:<e5**************************@posting.google. com>... I need to put current date into additional column title. I mean something like this
SELECT Name_1, ' ' AS CURDATE() FROM Table_1 ...
or, better
SELECT Name_1, ' ' AS CONCAT('My column ', CURDATE()) FROM Table_1 ...
But it doesn't work. AS seems to take only single strings. Is there any solution?
Thanks in advance.
Marek Kotowski Warsaw
Try (notice the 'AS' keyword is for making an alternative column name):
SELECT Name_1 AS Alternate_name, NOW() FROM Table_1;
or for formatting:
SELECT Name_1, DATE_FORMAT(NOW(),'%W, %M %D %Y') AS 'Formated date' FROM Table_1;
Read for formatting date: http://www.mysql.com/doc/en/Date_and...functions.html ed**********@hotmail.com (Nejoom) wrote in message
[...] or for formatting:
SELECT Name_1, DATE_FORMAT(NOW(),'%W, %M %D %Y') AS 'Formated date' FROM Table_1;
Thank you very much. The problem is I need an empty column
(to be printed and filled later), with a title with a current
date.
MK ed**********@hotmail.com (Nejoom) wrote in message
[...] or for formatting:
SELECT Name_1, DATE_FORMAT(NOW(),'%W, %M %D %Y') AS 'Formated date' FROM Table_1;
Thank you very much. The problem is I need an empty column
(to be printed and filled later), with a title with a current
date.
MK Ma************@wsip.com.pl (Marek Kotowski) wrote in message news:<e5**************************@posting.google. com>... I need to put current date into additional column title. I mean something like this
SELECT Name_1, ' ' AS CURDATE() FROM Table_1 ...
or, better
SELECT Name_1, ' ' AS CONCAT('My column ', CURDATE()) FROM Table_1 ...
But it doesn't work. AS seems to take only single strings. Is there any solution?
Thanks in advance.
Marek Kotowski Warsaw
Try (notice the 'AS' keyword is for making an alternative column name):
SELECT Name_1 AS Alternate_name, NOW() FROM Table_1;
or for formatting:
SELECT Name_1, DATE_FORMAT(NOW(),'%W, %M %D %Y') AS 'Formated date' FROM Table_1;
Read for formatting date: http://www.mysql.com/doc/en/Date_and...functions.html ed**********@hotmail.com (Nejoom) wrote in message
[...] or for formatting:
SELECT Name_1, DATE_FORMAT(NOW(),'%W, %M %D %Y') AS 'Formated date' FROM Table_1;
Thank you very much. The problem is I need an empty column
(to be printed and filled later), with a title with a current
date.
MK This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Nicolas Favre-Félix |
last post by:
Hello,
I have a little problem using Tkinter:
I'd like to make a interface with 3 labels on the left, facing with 3 Entry
on the right, a button below Entrys, and a Listbox under all. I could...
|
by: Marek Kotowski |
last post by:
I need to put current date into additional column title. I mean something like this
SELECT Name_1, ' ' AS CURDATE() FROM Table_1 ...
or, better
SELECT Name_1, ' ' AS CONCAT('My column ',...
|
by: Terry |
last post by:
Problem:
=========
Unknown column appearing in federated tables.
Description:
============
Local database (L) is an established 'federated' database, extracting
values from multiple remote...
|
by: Amber |
last post by:
There are times when you will need to highlight or otherwise modify
the contents of a particular DataGrid row-column value based upon the
value in the column. In this example we will select the...
|
by: dSchwartz |
last post by:
I need help adding a column to a dataset, but its a little bit more
complicated then just that. Here's the situation: I have many xml
files in one directory, each which represent a newsletter. I...
|
by: ricky |
last post by:
Hello,
If anyone could help me with this I would highly appreciate it. I've
tried everything and nothing works. What I am trying to do is so damn
basic and it's just frustrating that it seems...
|
by: Frank |
last post by:
I could use your help. I need to add tooltips to each column of an
HTML table, for the entire column of cells. I want to add a single
element to the table, and have that one element represent the...
|
by: Chran |
last post by:
Hi everybody,
I am working on a search function for an e-commerce site and I just cant figure this one out. It is probably not that hard but I am stuck.
The search is searching three columns in...
|
by: Death Slaught |
last post by:
I will be showing you how to make a very simple but effective three column layout.
First we will begin with the HTML, or structure, of our three column layout.
<!DOCTYPE html PUBLIC...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |