I am trying to get this query to work
INSERT INTO [ImportedDateRange] ([DataSet],[DateRange])
'webshop', (select DISTINCT cast([OrderCreatedDate] as DATE) from webshop)
I basically want it to look something like this:
DataSet DateRange
webshop 01/10/2013
webshop 02/10/2013
webshop 03/10/2013
webshop 03/10/2013
where webshop is entered each time but each date range is copied over in to a new row.
Also to check with the DateRange records for DataSet webshop already exist
thanks for any help and advice