Forum Replies Created

Viewing 15 posts - 2,536 through 2,550 (of 5,504 total)

  • RE: Dynamic SQL issue

    The task seems to be straightforward.

    What would you need the dynamic sql for?

    Couldn't you just pass the VARCHAR(MAX) value, the @where variable and the call of fnDelimitedSplit to the dynamic...

  • RE: Update using case statement

    Is there any specific reason for using the least preferred method?

  • RE: Are the posted questions getting worse?

    LutzM (11/23/2010)


    Alvin, that's what you look like when you've had time to shave?!? 😀

    But isn't that counterproductive regarding hunting season?

    LOL! True. Didn't consider that "alternative". Glad I'm in Europe. Might...

  • RE: Are the posted questions getting worse?

    Alvin, that's what you look like when you've had time to shave?!? 😀

    But isn't that counterproductive regarding hunting season?

  • RE: Dynamic SQL issue

    Digs (11/23/2010)


    Hi,

    I have a need to Script a where clause from client side and send it to the server to execute in dynamic sql.

    The issue is that the table...

  • RE: Calculate dates an individual lives in apartement each month

    @Ron:

    I guess the OP is all yours from now on. 😉

    At least (s)he's letting you know that you're getting closer...

    In order to get the monthla split I'd probably use a...

  • RE: Calculate dates an individual lives in apartement each month

    I'm getting confused...

    First you posted table def for [Tenants] and [Buildings] including sample data. Good point to start with...

    When I asked what you've tried so far you posted different DDL...

  • RE: Update using case statement

    You can't use a GROUP BY within your update statement directly.

    It's not really clear what you're looking for, but due to the GROUP BY aggregation I have to assume you're...

  • RE: Calculate dates an individual lives in apartement each month

    So, what have you tried so far?

  • RE: help me creating query

    GSquared (11/22/2010)


    Would adding a row_number() column (that's a function) do what you need?

    @shyaagi: The row_number() approach requires to specify a column that would define the order.

    Unfortunately, I cannot find an...

  • RE: T-SQL update

    Please see BOL (BooksOnLine, the SQL Server help system usually installed together with SQL Server) for the correct syntax (SET before FROM part):

    UPDATE [dbo].[progoogle]

    ...

  • RE: Job Schedule

    Ok, let's start at the very beginning:

    How long does it take to run the code in SSMS that is called within the job?

    If it consists of independed code blocks: How...

  • RE: Job Schedule

    wannalearn (11/22/2010)


    The status is in progress but it is continously trying to run the job for last 2 minutes.

    vs. previous post

    wannalearn (11/22/2010)


    the status is failed..

    Please tell us the error...

  • RE: How to make data(.mdf) to equal size slices!

    pavan_srirangam (11/22/2010)


    thanks any way

    one last question

    If I add more .ndf files to the database will reduce pagelatch_up waits and resource is 5:1:3 no.

    Because I found there are...

  • RE: Pass DB name as parameter to a SQL statement

    You would need dynamic SQL for this. Something lik the following:

    DECLARE @database NVARCHAR(128)='dbDRCT_1'

    DECLARE @sql NVARCHAR(2000)

    SET @sql='SELECT *

    FROM ' + @database +'.dbo.tblAuditMasterLog'

    PRINT @sql

    --EXEC (@sql)

Viewing 15 posts - 2,536 through 2,550 (of 5,504 total)