Forum Replies Created

Viewing 15 posts - 751 through 765 (of 1,229 total)

  • RE: Are the posted questions getting worse?

    bitbucket-25253 (12/19/2011)


    LutzM Posted Today @ 9:07 AM

    Hmmm.... interesting....

    Based on the (almost public available) age of the two fellows you're somewhat between 14 and 16 years old. Hard to believe that...

  • RE: Select specific days and hours from a date and make that a new column

    It works, but the day of week and time calculations don't have to be run multiple times. Apply is handy for this sort of thing:

    SELECT

    d.aRow,

    d.aDate,

    x.[Dayname],

    x.TheTime,

    Weekend = CASE...

  • RE: Help on this linked server stored proc

    pespes009 (12/19/2011)


    its being highlighted in the temporary table above...although i did not paste that here

    I think the problem is with the join on the

    JOIN VR_DataLoad.prdrmkt.dbo.tbl_asset_instance ai

    not that at all

    Please...

  • RE: Help on this linked server stored proc

    You will need to work outside of the stored procedure, checking each query separately, in order to get this working. Can you do this? Here's the first part. You don't...

  • RE: Help on this linked server stored proc

    pespes009 (12/19/2011)


    Which column please highlight ...

    Many thanks

    The one which is referred to in the second query:

    isNull(#a.DisposalType, '''') AS DisposalRoute,

  • RE: Help on this linked server stored proc

    The second column here isn't named:

    INSERT #a

    SELECT

    currA.numAsset_instance_id,

    CASE WHEN isnull(vcca.numAsset_instance_id, 0) > 0 THEN ''Retail''

    WHEN isnull(vcaa.numAsset_instance_id, 0) > 0 THEN ''Auction''

    ELSE ''Unassigned''

    END

    FROM VR_DataLoad.prdrmkt.dbo.v_current_asset_instance currA

  • RE: CASE along with IN

    CASE resolves a value or column:

    SELECT aValue = CASE WHEN 1 = 1 THEN 10 ELSE 20 END

    Your query fails because CASE is resolving a statement.

    Try this:

    ;WITH MyTable AS (SELECT...

  • RE: Help on this linked server stored proc

    pespes009 (12/19/2011)


    When i run this stored proc it falls over with the multi-part idenfier.......

    Easy to check if this is the case

    SELECT TOP 10 * FROM VR_DataLoad.prdrmkt.dbo.v_current_asset_instance

    SELECT TOP 10 *...

  • RE: How to achive this output

    Hi Sami

    Can you change your data samples to DDL please? CTREATE TABLE and INSERTs. If you're not sure how to do it, read the link in my sig (please read...

  • RE: How to achive this output

    Please don't cross post, it fragments replies and wastes time.

    Replies to http://www.sqlservercentral.com/Forums/FindPost1223667.aspx

  • RE: Create a view for the below table. Help Please.

    Hi

    Can you set up your sample data for easy consumption, like this:

    CREATE TABLE #Sampledata (LEVEL1 datatype, LEVEL2 datatype, LEVEL3 datatype, LEVEL datatype, ID datatype, datatype, DESC datatype, CUSTNO datatype,...

  • RE: How to Update records of one table by selecting more than one rows from another table

    John Mitchell-245523 (12/16/2011)


    Beware - this will bite you if any row you are updating (call it table1) has more than one match in the table you are updating from (table2)....

  • RE: Does the Database Mail Task in SSIS use Database Mail?

    GSquared (12/15/2011)


    It does not use SQL Server Database Mail.

    It does use SMTP. But so does Database Mail. SMTP is simply the mail transfer method ("Simple Mail Transfer Protocol"...

  • RE: 8hr hour query ?!?!?!?!?!?!?!

    GilaMonster (12/14/2011)


    btw, if I've understood you properly

    DELETE FROM ContactGroupMember

    WHERE NOT EXISTS (SELECT 1 FROM #FinalResults AS FR WHERE ContactGroupMember.ContactGroupId = FR.ContactGroupID AND ContactGroupMember.ContactId = fr.OwnerID)

    This will generate different results to...

  • RE: help in the query

    Folks may be a little reluctant to help with this because it looks - forgive me if I'm wrong - as if someone fairly new to TSQL has gone a...

Viewing 15 posts - 751 through 765 (of 1,229 total)