Forum Replies Created

Viewing 15 posts - 6,211 through 6,225 (of 15,381 total)

  • RE: Create table, how to set PK as MMYYYY?

    mario17 (11/22/2013)


    Hi, all

    I need to create table with time history data for each month,

    now I have PK below, but there is a chance I will need to rerun my script,...

  • RE: QEURY HELP: Case when X happens, return INFORMATION_SCHEMA.COLUMNS in comma delimited list

    Hi and welcome to the forums! It is kind of hard to figure out what you are trying to do.

    In order to help we will need a few things:

    1....

  • RE: SQL works fine, but doe's not work called by a Stored Procedure

    Luis Cazares (11/22/2013)


    Why are you inserting into a table variable and then selecting from it instead of doing the select directly as you do with your original query?

    Sean, I can't...

  • RE: Change format Numeric to mmm-yy

    Vitor da Fonseca (11/22/2013)


    Hi,

    I have the following statement to give me the month

    Month(DateAdd('m',-3,[Enter_Month])) AS month4

    which gives me the month number e.g. 1, 2, 3, etc how can i format this...

  • RE: Are this is the real Job requirements for a DBA?

    MohamedDBA (11/22/2013)


    I'm beginner in the DBA world , and I was read this job ad for a DBA , but the job requirements was shocked me , this is the...

  • RE: SQL works fine, but doe's not work called by a Stored Procedure

    This is a sql server site and it appears the ddl you posted is for Oracle. Keep in mind that any code you receive the works well in sql server...

  • RE: split table

    phamm (11/22/2013)


    Hi all,

    How would I split a table into multiple chunks of 2000 records? example: I have a table with 123000 rows, how would I split it into multiple tables...

  • RE: Maximum stored procedure nesting

    benjamin.reyes (11/21/2013)


    This is the error I get.

    Msg 156, Level 15, State 1, Procedure MyProc, Line 13

    Incorrect syntax near the keyword 'union'.

    The OP obviously posted pseudocode. There is nothing like syntax...

  • RE: Maximum stored procedure nesting

    nelson.muller (11/21/2013)


    I understand the best practices and I am quite experienced with SQL server. I haven't seen this error before. Unfortunately the procedure is over 2,000 lines long and has...

  • RE: Maximum stored procedure nesting

    nelson.muller (11/21/2013)


    Here's a snippet of the procedure. The error is pointing to MyNotificationProcedure.

    create procedure MyProc

    as

    begin try

    -- SQL Code

    ;with MyRecursion

    as

    (

    -- Anchor

    union all

    -- Recursion

    )

    select * from MyRecursion

    -- SQL Code

    return 0

    end try

    begin catch

    exec...

  • RE: Stored Procedure and Parameters Table

    rayh 98086 (11/21/2013)


    Hi,

    Thank you. The part I am getting hung up on or just don't understand is having the parameters for a where statement be variable. How do...

  • RE: Stored procedure - how to return a single table

    lukavog (11/21/2013)


    Hi 😛

    I have this SP

    ALTER PROCEDURE GetDelayIntervalData(@start datetime, @stop datetime, @step int)

    AS

    DECLARE @steps bigint

    SET @steps = DATEDIFF(hour, @start, @stop)/ @step

    DECLARE @i bigint

    SET @i=0

    DECLARE @tempStep varchar

    SET @tempStep = DATEPART(hour, @start)

    WHILE...

  • RE: Stored Procedure and Parameters Table

    rayh 98086 (11/21/2013)


    To all:

    I am creating a paramaters table to store values for mulitple sctipts.

    For example, I will create a Table called ScriptParameters with the fields ID, scriptname, ScriptValue, and...

  • RE: Count for each account no -parent and childsql

    nutty (11/21/2013)


    Yes it does match what I want as output.

    However the trouble is, these child codes are common codes for various other parent codes.

    For example two different parents can share...

  • RE: Pushing inserts into SQL server with C# ?

    blasto_max (11/21/2013)


    This site and msdn...actually everything should move to Stack overflow which is far more convenient. There is no confusion, only simplicity and solutions. How about an ETL job for...

Viewing 15 posts - 6,211 through 6,225 (of 15,381 total)