Forum Replies Created

Viewing 15 posts - 5,746 through 5,760 (of 10,144 total)

  • RE: Are the posted questions getting worse?

    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...

  • RE: Outer join not working correctly

    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...

  • RE: UNION TWO TABLES WITH ONLY ONE COLUMN IN COMMON

    mickyT (9/3/2012)


    You could try the following query.

    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,...

  • RE: Insert from excel to sql using Microsoft.ACE.OLEDB.12.0

    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...

  • RE: updating the last two spaces of a column

    thomasrichardson2000 (9/3/2012)


    Thanks so far, I will clarify further. The requirement is that i update the version field with the letters 'BT' at the end, So if the column is defined...

  • RE: UNION TWO TABLES WITH ONLY ONE COLUMN IN COMMON

    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...

  • RE: Date Query Format Problem

    jerome.morris (9/3/2012)


    Right I think I was doing the convert in the wrong place, this returns results I want to see.

    SELECT MachineName, ModeName, FileName,...

  • RE: Date Query Format Problem

    jerome.morris (9/3/2012)


    Thanks Chris, sorry to post and post but I feel like I am close. I dont have a holing table anymore and the only problem I have is running...

  • RE: Date Query Format Problem

    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 -...

  • RE: Help with Stored Procedure

    NiKo22 (8/31/2012)


    I have created a stored procedure that uses a temp table to do some updates.

    the problem is that the update statement outside the stored procedure works fine , but...

  • RE: Error converting data type nvarchar to numeric

    rachelbr 87580 (9/2/2012)


    Hi,

    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...

  • RE: The Beer Cooler Thread

    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 -...

  • RE: Date Query Format Problem

    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...

  • RE: Date Query Format Problem

    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...

  • RE: Date Query Format Problem

    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.

Viewing 15 posts - 5,746 through 5,760 (of 10,144 total)