Forum Replies Created

Viewing 15 posts - 6,301 through 6,315 (of 8,755 total)

  • RE: stored proc (@param_1,@param_2) exec(create view as (select .. @param_1)

    ravikumar_v (1/10/2015)


    Hi,

    Require help in passing parameters to a stored proc for ex:

    GO

    create procedure [dbo].[sp_create_proc]

    (

    @v_in_dbnm varchar(255),

    @v_in_schemanm varchar(30)

    )

    as

    BEGIN

    DECLARE @v_in_dbname nvarchar(255)

    DECLARE @v_in_schemaname nvarchar(30)

    DECLARE @sql nvarchar(MAX)

    SET @v_in_dbname = @v_in_dbnm

    SET @v_in_schemaname = @v_in_schemanm

    SET @sql='CREATE...

  • RE: SQL Select stament

    Jeff Moden (1/10/2015)


    Requires prior knowledge that the "T" is the exception. I realize that's exactly what the OP asked for but was that just because of the example he...

  • RE: Data Lakes

    As implied, the concept has been around for a long time, tends to be shaped somewhat by whichever technology is in at the time. In my opinion, tossing in another...

  • RE: Split Function on the basis of Contact Number

    For completeness (and some fun :-)) here are two other solutions for 2012 and later

    😎

    Almost direct translation to window function version, uses LAG instead of aggregation for the cross row...

  • RE: Split Function on the basis of Contact Number

    Quick but slightly verbose solution, does only scan the table once but that comes at an additional cost, would be a perfect case for LAG/LEAD on SQL Server 2012 or...

  • RE: SQL Select stament

    Dee Dee-422077 (1/9/2015)


    Hi,

    My example data as this:

    ID code1 code2

    1 a ...

  • RE: CHOOSE() a RAND() vowel not working???

    Got it printed in a folder along with your's (about three years back) and Phil Factor's last years RBARR / RBAR-RAND one;-)

    😎

  • RE: CHOOSE() a RAND() vowel not working???

    Jeff Moden (1/9/2015)


    I personally don't know of any programming language that actually has a true random number generator function. That's not to say that there isn't one but I...

  • RE: how to create a dynamic update statement based on return values in a select statement.

    JP10 (1/9/2015)


    Ok I have a query "SELECT ColumnNames FROM tbl1" let's say the values returned are "age,sex,race".

    Now I want to be able to create an "update" statement like "UPATE tbl2...

  • RE: CHOOSE() a RAND() vowel not working???

    Jeff Moden (1/9/2015)


    Eirikur Eiriksson (1/9/2015)


    My thought is that some of the random function implementations in SQL Server are more caused by the limitations of this particular function ( RAND() )...

  • RE: CHOOSE() a RAND() vowel not working???

    My thought is that some of the random function implementations in SQL Server are more caused by the limitations of this particular function ( RAND() ) rather than anything else....

  • RE: CHOOSE() a RAND() vowel not working???

    Quick thought, an alternative way of getting an execution plan for this kind of simple statements is to use a CTE, has less inpact/noise in the plan as it's normally...

  • RE: Are the posted questions getting worse?

    Luis Cazares (1/8/2015)


    spaghettidba (1/8/2015)


    Steve Jones - SSC Editor (1/8/2015)


    It's probably not that site posting SPAM, but someone with an affiliate code, or perhaps just a vandal.

    Maybe. Meanwhile, no response from...

  • RE: Are the posted questions getting worse?

    spaghettidba (1/8/2015)


    Are the spammers getting worse?

    Fight fire with fire: let's spam their contact form!

    Now all you have to do is to create a SQL Job that posts random text to...

  • RE: Connections string issue between 2005 and 2012

    Meatloaf (1/7/2015)


    Thank you! Here is my code:

    Dim objConn, objRS, strQuery,strConnection

    set objConn = Server.CreateObject("ADODB.Connection")

    set objRS = Server.CreateObject("ADODB.RecordSet")

    strConnection = "User ID=xx;Password=xxxxxxxxxx;"

    strConnection = strConnection & "Driver={SQL Server};Server=DB_Server_NAME;Database=MY_DB;"...

Viewing 15 posts - 6,301 through 6,315 (of 8,755 total)