Forum Replies Created

Viewing 15 posts - 181 through 195 (of 2,006 total)

  • RE: Need Help

    In a script component, do something like this (untested): -

    DirectoryInfo directory = new DirectoryInfo("T:\\Test");

    ...

  • RE: Beginner, Expert, or Both?

    simon.crick (10/7/2013)


    So if it works 1% faster but is 10 times as complex, you still go for the "advanced" technique?

    All I can say to that is "it depends". I purposely...

  • RE: Beginner, Expert, or Both?

    simon.crick (10/7/2013)


    I will probably get shot down again for saying this, but I believe people should stick to core technology and basic tecnhiques unless there is a very good reason...

  • RE: Beginner, Expert, or Both?

    I think of myself as a beginner. I've been working with SQL Server for almost 4 years and generally move on to a new job as soon as I...

  • RE: Count Of Level in parent table

    dwain.c (10/2/2013)


    I choose option 1!

    Got to agree, the logic isn't quite right for the outer apply method. The below uses a sproc written by Jeff Moden for generating a...

  • RE: Count Of Level in parent table

    --SAMPLE DATA

    --NOTE: IF YOU LAY OUT YOUR SAMPLE DATA LIKE THIS, PEOPLE ARE MORE LIKELY TO HELP YOU!

    IF object_id('tempdb..#testEnvironment') IS NOT NULL

    BEGIN;

    DROP TABLE #testEnvironment;

    END;

    SELECT subjectid, subjectname,...

  • RE: Is this Correct Use of Dynamic SQL???

    When you post in multiple threads like this, you fragment answers and make people have to start from the beginning again with helping you. If you have further questions, stick...

  • RE: Can You make this code Shorter??..

    enriquezreyjoseph (9/27/2013)


    Can I used this instead of sp_executesql i will use EXEC only??...cadavare

    I'm not sure how many times I have to say "SQL Injection" to you. . . yes you...

  • RE: Prevent backups on C:\ drive?

    andrew gothard (9/27/2013)


    Can anyone - off the top of their heads - think of a way of preventing backups being taken to the C:\ drive?

    I've run a very quick google...

  • RE: Using Alias in Where

    SELECT TOP 5 ID, MID, RName, Pic1, FoodType, Average_P_PP, lat, lng, Distance

    FROM (

    SELECT ID, MID, RName, Pic1, FoodType.Descr AS FoodType, Average_P_PP, lat, lng, Zoom, MAct, (

    ...

  • RE: Can You make this code Shorter??..

    enriquezreyjoseph (9/27/2013)


    Cadavre (9/27/2013)


    enriquezreyjoseph (9/27/2013)


    Thank you guys..

    so, i should change varchar now to my whole table and to my front-end...tsk :-(..

    You're also vulnerable to SQL injection. Please look over the code...

  • RE: Can You make this code Shorter??..

    enriquezreyjoseph (9/27/2013)


    Thank you guys..

    so, i should change varchar now to my whole table and to my front-end...tsk :-(..

    You're also vulnerable to SQL injection. Please look over the code I posted...

  • RE: Can You make this code Shorter??..

    Why not build up your WHERE clause like this?

    ALTER PROCEDURE [dbo].[SearchBiography] @firstname NVARCHAR(50), @middlename NVARCHAR(50), @lastname NVARCHAR(50), @sexID NCHAR(1), @statusID NCHAR(1) AS

    BEGIN;

    SET NOCOUNT ON;

    ...

  • RE: Query now runs forever

    Cadavre (9/24/2013)


    One of these queries may help.

    --== Locks held in database ==--

    SELECT request_session_id AS [spid], DB_NAME(resource_database_id) AS [dbname],

    CASE WHEN resource_type = 'OBJECT' THEN OBJECT_NAME(resource_associated_entity_id)

    WHEN...

Viewing 15 posts - 181 through 195 (of 2,006 total)