Forum Replies Created

Viewing 15 posts - 256 through 270 (of 345 total)

  • RE: Stored Proc with dynamic table column

    I agree with you wholeheartedly, Ninja. But this will work fine for small to moderate size tables. That's also something for the OP to figure out, when to use a...

  • RE: Stored Proc with dynamic table column

    I had some time to play. Try this out, thbaig1.

    create table test (ID int, col1 bit, col2 bit);

    insert into test (ID, col1, col2)

    select 1, 1, 1 union all select 2,...

  • RE: Stored Proc with dynamic table column

    If you have such a bad design to your database that you are adding columns to a table dynamically, then you won't care about more bad code.

    It's pretty easy...

  • RE: newbie to sql server

    Can you work in the frozen banana stand this weekend?

  • RE: data migration from access to sql server

    Ninja's_RGR'us (5/3/2011)


    How can you NOT use SSMS?

    Do you mean SSMS import wizard?

    HAHA! Acronym confusion levels maxed! By SSMS, I meant SQL Server Migration Assistant for Access that calvo had referenced.

  • RE: data migration from access to sql server

    Ninja's_RGR'us (5/3/2011)


    I like the comment idea. I personnally put those in prints so that I can follow along as the script executes. Also you have more logged info...

  • RE: data migration from access to sql server

    Let your migration script become your design document. Create a .sql script that creates the database, creates the tables, indexes, views, procedures, everything . Use something like OPENROWSET to grab...

  • RE: Delete files that are older than 7 days

    QQ-485619 (4/29/2011)


    I have a folder in d drive called Archive (d:\archive) which stores all data load files. The name of these files various, and I need to create...

  • RE: Names of People Born in specific month

    calvo (4/28/2011)


    ColdCoffee (4/28/2011)


    toddasd (4/28/2011)


    @waynes: You write some great code.

    I totally concur 🙂 he is awesome, like how The Miz in WWE says, Wayne is awesome 🙂

    lol...love it. You...

  • RE: Names of People Born in specific month

    Seriously?

    njdevils39 (4/28/2011)


    How would I insert the names of the employees and their date of births from the employee table into the declared test table.

    DECLARE @test-2 TABLE

    ...

  • RE: Create Login?!

    Your quotes are off, I don't see how that runs at all.

    This works for me:

    declare @ip_newuser varchar(100);

    declare @sql varchar(max);

    set @ip_newuser = 'new_user';

    --begin tran srvr;

    set @sql ='...

  • RE: Need to concatinate

    I didn't notice they were firing the same job. Do this:

    if Exists (select 1 where 1=1)

    and

    not Exists (select 1 where 1=0)

    and

    not Exists (select 1 where 1=0)

    exec...

  • RE: Need to concatinate

    if Exists (select 1 ...)

    begin

    exec ...

    end

    else

    if Exists (select 1 ...)

    begin

    exec ...

    end

    else

    if Exists (select 1 ...)

    begin

    exec ...

    end

  • RE: Multiple Counts

    What is difficult today becomes trivial tomorrow. Or so I hope. 😛

  • RE: delete records by day

    Sure thing. But the question lingers: why generate the delete statements like this? Why not just delete for the year? I'm very curious to your reasoning. :unsure:

Viewing 15 posts - 256 through 270 (of 345 total)