Forum Replies Created

Viewing 15 posts - 1,516 through 1,530 (of 2,038 total)

  • RE: Migration from SQL Server 7 to 2005

    Hi

    You can use IDENTITY_INSERT to ON for the data migration. After this use DBCC CHECKIDENT to set the new seed value:

    CREATE TABLE #T (Id INT IDENTITY(1, 1), Txt VARCHAR(50))

    -- Allow...

  • RE: Best way to strip time from datetime stamp.

    Hi

    Sorry for barging in... The huge advantage of the DATEADD method is that it can also be used to get the first day of year, first day of month, ......

  • RE: Returning from my query, which calls a SP

    Hi

    Just a little oversight... Snipped of of GSquared's code:

    @Username VARCHAR(255), -- < Here you missed the comma

    @ret int output

    😉

    Greets

    Flo

  • RE: How to insert into table based on previous results

    Chris Morris (4/7/2009)


    jbuttery (4/7/2009)


    Thanks for the replies guys. I'll try suggestions. I can do a SELECT, but not sure how to manipulate data and then insert.

    Post the select, Flo will...

  • RE: How to insert into table based on previous results

    jbuttery (4/7/2009)


    Existing data in row 1

    Col0(Identity)Col1 Col2 Col3 ...

  • RE: xp_cmdshell Problems

    Hi

    So it's a problem with the rights. I'm not sure if your user account or the SQL Server Service account needs the rights for the server.

    Hope somebody else has more...

  • RE: Elapsed time with Saturdays

    Bob Hovious (4/6/2009)


    We host systems for a number of clients, but they all have separate DBs and so we can set up their tables differently.

    Misconceived, it's only one international customer...

  • RE: Elapsed time with Saturdays

    Sure only one holiday column doesn't make much sense, but a holiday column for each country seems also not to be the complete solution.

    First reason:

    My customer want's to maintain the...

  • RE: How to insert into table based on previous results

    Hi

    I'm not sure if I got you, but I'll try...

    Do you mean this?

    INSERT INTO Mytable (col1, col2, col3, col4)

    SELECT col1 + 1, col2 + 1, col3 +...

  • RE: Elapsed time with Saturdays

    Bob Hovious (4/6/2009)


    Argh.

    I'm running around like a chicken with my head cut off today. I saw the word tally and assumed you were doing the query straight from...

  • RE: Elapsed time with Saturdays

    Bob Hovious (4/6/2009)


    Be my guest Flo. 🙂 By a calendar table, I actually meant a table other than a tally table, which would list weekend days...

  • RE: Elapsed time with Saturdays

    Hi Bob

    A CTE, as ordered:

    ; WITH

    t1 (N) AS (SELECT 1 UNION ALL SELECT 2),

    t2 (N) AS (SELECT t.N FROM t1, t1 t),

    t3 (N) AS (SELECT t.N FROM t2, t2 t),

    t4...

  • RE: Export as data file from table

    Hi

    Have a look to BOL for "bcp utility" this should be your solution.

    Greets

    Flo

  • RE: Reference 'Deleted' table: Dynamic SQL

    Hi

    One "SELECT" too much... 😉

    SELECT @tmpOldQuery = N'select @rtnVal = @fieldname1 from #Del where employeeid = 1'

    Select @ParamDef = N'@fieldname1 nvarchar(200), @rtnVal nvarchar(200) OUTPUT'

    @fldname = 'SSN4'

    EXEC dbo.sp_executesql tmpOldQuery,

    ...

  • RE: xp_cmdshell Problems

    Hi Kevin

    Could you explain more detailed which error(s) you get. This works just fine:

    CREATE PROCEDURE usp_TestCmdShell

    AS

    EXECUTE xp_cmdshell 'dir C:\'

    GO

    EXECUTE usp_TestCmdShell

    Greets

    Flo

Viewing 15 posts - 1,516 through 1,530 (of 2,038 total)