Viewing 15 posts - 1,201 through 1,215 (of 3,543 total)
Ooops!
Thanks Wayne, forgot about that in my haste. :blush:
November 2, 2010 at 11:21 am
CREATE TABLE #header (Data varchar(max))
CREATE TABLE #result (dummycolumn int)
BULK INSERT #header FROM 'C:\TEMP\CSV1.csv' WITH (DATAFILETYPE = 'char',ROWTERMINATOR = '',LASTROW = 1)
DECLARE @sql varchar(max)
SELECT @sql = COALESCE(@sql+',['+SUBSTRING(Data, N, CHARINDEX(',', Data +...
November 2, 2010 at 8:14 am
GSquared (10/29/2010)
October 29, 2010 at 7:44 am
Grant Fritchey (10/28/2010)
Jeff Moden (10/28/2010)
Task complete. Submitted article via "Write For Us".Over-achiever.
Meh! Jeff probably hasn't heard the saying 'Nobody likes a smart a$$' 😛
October 28, 2010 at 6:11 am
doug 40899 (10/27/2010)
Then can you give me an example of max being used? This query is being included in an application that's being built and if I can improve it...
October 27, 2010 at 9:32 am
doug 40899 (10/26/2010)
G,It might but since I already have this in place and I'm going to be using the variable anyway, why not use it for this as well.
Doug
Notwithstanding...
October 27, 2010 at 6:42 am
jez.lisle (10/26/2010)
David Burrows (10/26/2010)
Do you have a proxy set up for xp_cmdshell?If so does it have access to the file?
Sorry I dont know what you mean, how would this be...
October 26, 2010 at 7:03 am
Do you have a proxy set up for xp_cmdshell?
If so does it have access to the file?
October 26, 2010 at 6:46 am
Wow! All these negative vibes :pinch:
I come in this morning and the thread has gone serious :angry:
Now I have to find a dark room to lay down and contemplate a...
October 19, 2010 at 1:59 am
Try using DelimitedSplit8K function described here and the following query
SELECT test.CuS_id, split.ItemNumber, split.Item
FROM test
CROSS APPLY
(
...
October 13, 2010 at 6:37 am
askquestions (10/8/2010)
October 8, 2010 at 7:08 am
Another alternative (although will cause a scan)
SELECT VendorId
FROM Vendors
WHERE CountryId = @CountryId
AND CHARINDEX(','+CAST(CityId as nvarchar(10))+',',','+@CityId+',') > 0
ORDER BY CreatedDate
October 5, 2010 at 7:06 am
UMG Developer (9/30/2010)
scott.pletcher (9/30/2010)
Technically you don't have to manipulate the date in the table. For a million+ row table, you save a million+ calcs 🙂 :
Duh. I was so...
October 1, 2010 at 2:10 am
Or...
ORDER BY SIGN(DATEDIFF(day,GETDATE(),EventDate)) & 0x80000000 DESC,EventDate ASC
September 30, 2010 at 7:14 am
sangeethu (9/9/2010)
Thanks for the reply. I have gone through Cross Tab and Dynamic Cross tab and found that it involves aggregation of a column. But in my case every...
September 9, 2010 at 6:40 am
Viewing 15 posts - 1,201 through 1,215 (of 3,543 total)