tags:

views:

26

answers:

1

hi all

I am exporting from a database to excel. While doing so it is exporting the records as such to the excel.

So I am using an alias name to modify the query in c#.net but it generates an error.

The query is

select name as personsname,eventtime as Date/time from mytable

Here the Date/time as alias name creates error

Can anybody guide me to get out of this?

+3  A: 

Use [Date/time]

select name as personsname,eventtime as [Date/time] from mytable
astander
thank astander , i got it by using ur syntax
subash