Forum Replies Created

Viewing 15 posts - 46 through 60 (of 615 total)

  • RE: delete from table based on where exists

    ChrisM@Work (1/16/2014)


    Personally I use SELECT 1, but I might change it to the above.

    So do I actually. I've always used SELECT 1 because ultimately what the sub query returns is...

  • RE: delete from table based on where exists

    No. It knows exactly which ones to delete.

    Does it?

    CREATE TABLE SSC1 (ID INT, Name VARCHAR(50))

    INSERT INTO SSC1 SELECT 1, 'Abu Dina' UNION ALL SELECT 2, 'Howard Zinn' UNION ALL SELECT...

  • RE: Can't access "my Posts"

    Lowell (1/14/2014)


    went to try to find a post i contributed recently, but i ended up getting an error. i don't know if it's me specifically, or the site in general.

    ...

  • RE: SSIS help required

    kapil_kk (1/15/2014)Can you please tell me one thing that what is the use of the variable type Object?

    Think of it as a place holder for your query so it holds...

  • RE: SSIS help required

    Yes you will need to configure the Parameter Mapping section of the Execute SQL Task. You will need two entries in there so something like this:

    Variable Name = User::str1

    Direction =...

  • RE: SSIS help required

    kapil_kk (1/15/2014)


    Abu Dina (1/15/2014)


    Abu Dina (1/15/2014)


    kapil_kk (1/15/2014)


    I have created a foreach container to capture values from a query and run a script for each line. For some reason though I...

  • RE: Using (And) OR operators correctly

    Difficult to answer your question but from what I understand, your derived table will return results if any of these are empty:

    t1.Diag_Code1

    t1.ClosureStatus

    t1.DISCHARGE_DISP

    Is that what you want?!

  • RE: Convert Float to DateTime

    Nice 1 David:

    This is my attempt lol:

    declare @test-2 float = '1.21793287400577E+15'

    select left(cast(CAST(@test as bigint) as varchar(20)), LEN(cast(CAST(@test as bigint) as varchar(20)))-6)

    select DATEADD(SS, CAST(left(cast(CAST(@test as bigint) as varchar(20)), LEN(cast(CAST(@test...

  • RE: SSIS help required

    Abu Dina (1/15/2014)


    kapil_kk (1/15/2014)


    I have created a foreach container to capture values from a query and run a script for each line. For some reason though I can't get past...

  • RE: SSIS help required

    kapil_kk (1/15/2014)


    I have created a foreach container to capture values from a query and run a script for each line. For some reason though I can't get past the variable...

  • RE: How to give aliase name to column dynamically

    Afraid not... you have to use dynamic SQL for this kind of thing.

  • RE: How to give aliase name to column dynamically

    EXEC ('select Number, Name As ' + @STR + ' from #Temp')

  • RE: delete from table based on where exists

    Your first query is returning two columns: a.AccountId, b.StockId

    Then your delete is using the EXISTS operator which is fair enough but the inner query returns multiple rows so how...

  • RE: Dynamic Query issue

    So what is @tabname? The variable is declared in your code but is not being assigned anything?

    With dynamic SQL it's a good idea to PRINT the content first to...

  • RE: Sabbatical

    quackhandle1975 (1/9/2014)


    I have also become addicted to Chess in the past 18 months for some reason having no interest before this. How odd. :crazy:qh

    Not odd at all. I fell...

Viewing 15 posts - 46 through 60 (of 615 total)