Viewing 15 posts - 5,746 through 5,760 (of 10,144 total)
David Burrows (9/4/2012)
Fal (9/3/2012)
Quick poll: how would you pronounce the word "Route"?I'll explain why later, if I'm not too embarrassed. :blink:
Steve.
I am English so naturally /ru?t/
Likewise - but how...
September 4, 2012 at 2:08 am
Not far off. You need a left outer join to the items table: this will return all rows from the left hand side of the join (venue stock) whether or...
September 4, 2012 at 2:02 am
mickyT (9/3/2012)
select f.Path, f.FolderName, f.FolderSize, d.FileName, d.FileSize
from @folders f
left outer join @Files d on f.Path = d.Path
group by grouping sets ((f.Path, Foldername, FolderSize), (f.path,...
September 4, 2012 at 1:49 am
Use a staging table:
CREATE procedure mySP
@excelfile varchar(200)
AS
DECLARE @sql varchar(1024)
CREATE TABLE #MyLocalTempTable ([columns which nicely match the Excel file])
SET @sql='SELECT...
September 3, 2012 at 9:29 am
thomasrichardson2000 (9/3/2012)
September 3, 2012 at 6:07 am
You need "placeholder" columns:
SELECT
[Path],
Foldername,
FolderSize,
[Filename],
FileSize
FROM (
SELECT
[Path],
[Filename] = CAST(NULL AS Varchar(50)),
FileSize = CAST(NULL AS INT),
Foldername,
FolderSize
FROM @folders
UNION ALL
SELECT
[Path],
[Filename],
FileSize,
Foldername = CAST(NULL...
September 3, 2012 at 6:00 am
jerome.morris (9/3/2012)
SELECT MachineName, ModeName, FileName,...
September 3, 2012 at 5:32 am
jerome.morris (9/3/2012)
September 3, 2012 at 5:22 am
jerome.morris (9/3/2012)
Hi Jefff, where am I going wrong with this query please ...
Jay, you are likely to progress far more quickly with this problem - the date format problem -...
September 3, 2012 at 5:04 am
NiKo22 (8/31/2012)
the problem is that the update statement outside the stored procedure works fine , but...
September 3, 2012 at 4:05 am
rachelbr 87580 (9/2/2012)
I have this stored proc that I run nightly. I keep on having issues with it failing because it's having issues converting a nvarchar. This...
September 3, 2012 at 2:25 am
nwerner (8/31/2012)
Meantime Naval College Old Porter at Brasserie V Belgian restaurant in Madison, Wisconsin last night, moules+frites 😎 http://www.brasseriev.com
The writeup is amazing. Meantime [/url]brew some great pale ales -...
September 3, 2012 at 2:05 am
DECLARE @StartDate_Time DATETIME, @EndDate_Time DATETIME
SELECT @StartDate_Time = CONVERT(DATETIME,'06/06/2012',103), @EndDate_Time = CONVERT(DATETIME,'07/06/2012',103)
SELECT @StartDate_Time, @EndDate_Time
SELECT
x.ProperStartDateTime,
d.*
FROM SLADB.dbo.ProdDataTB d
CROSS APPLY (
SELECT
[Year] = RIGHT(d.StartDate_Time,4),
x.MonthNum,
[Day] = SUBSTRING(d.StartDate_Time,9,2),
[Time] = SUBSTRING(d.StartDate_Time,12,8)
FROM (VALUES...
August 31, 2012 at 8:19 am
SELECT
d.StartDate_Time,
date_string = p.[Year]+'-'+p.MonthNum+'-'+p.[Day]+' '+p.[Time],
date_datetime = CONVERT(DATETIME,p.[Year]+'-'+p.MonthNum+'-'+p.[Day]+' '+p.[Time],120)
FROM (SELECT StartDate_Time = 'Wed Sep 01 03:00:00 2010') d
CROSS APPLY (
SELECT
[Year] = RIGHT(d.StartDate_Time,4),
x.MonthNum,
[Day] = SUBSTRING(d.StartDate_Time,9,2),
[Time] = SUBSTRING(d.StartDate_Time,12,8)
FROM...
August 31, 2012 at 7:23 am
Jerome, can you post the CREATE TABLE script for SLADB.dbo.ProdDataTB? Remove the other columns if you wish. To get the script, right-click on the table in object explorer in SSMS.
August 31, 2012 at 6:59 am
Viewing 15 posts - 5,746 through 5,760 (of 10,144 total)