Last post Dec 26, 2009 05:31 AM by Mikesdotnetting
Dec 26, 2009 12:56 AM|shaair|LINK
I just want to add new teo number in the Data set not in actual table. i have this query.
SELECT ConcertName AS Name, ConcertDate AS Date
FROM Concerts -------------------Here I want <colum-name> = ‘1’
UNION SELECT EventName AS Name, EventDate AS Date
FROM Events -----------Here I want <colum-name> = ‘2’
ORDER BY Date, Time
please help me
Dec 26, 2009 02:30 AM|Mikesdotnetting|LINK
SELECT 1 As ColumnName, ConcertName AS Name, ConcertDate AS Date
SELECT 2 As ColumnName, EventName AS Name, EventDate AS Date
Dec 26, 2009 04:38 AM|shaair|LINK
thanx for reply. but dear i want to ask that these colum name are not exist. i want to create column and distroy after function call.
Dec 26, 2009 05:31 AM|Mikesdotnetting|LINK
Have you tried the SQL I posted? It will only create the columns in the dataset. They don't persist in the database or anything. Once you have finished with the dataset, the extra columns will disappear along with the dataset.