Forum Replies Created

Viewing 15 posts - 1 through 15 (of 114 total)

  • RE: Non clustered Index taking up more space than data

    To expand on what george said, does your primary key for the table include a lot of columns? The entire key for the table will be included in the...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Storing result set as a variable in a procedure

    Also, your question doesn't match the title of your post. did you miss a part of the question?



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: The optimal combination of tools for flexible reports

    If you're only building one report, then I'd suggest working backwards from the requirements; _first_ figure out what you need the report top do, and _then_ decide what platform allows...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Queries currently running on Oracle server???

    In SQL Developer, there are a couple of options in the tools menu.

    Monitor Sessions shows the results of the following query:

    with vs as (select rownum rnum,

    ...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Speed up Query by replacing subselects

    In sql server, it's generally better to refactor your subselects to a join. I don't know how much that applies to oracle. Will you be running this across...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: CPU hungry query

    This is a shot in the dark, but try the following:

    SELECT

    DS.LocationID

    ,M.InventoryItemID

    ,SUM(DS.OrderPrice * isnull((select count(w.startDate)

    from dbo.Period m

    where W.PeriodType=1

    AND w.startDate...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Linked Server - How to escape reserved-word column names in update?

    In the end I could not fuigure out how to escape the reserved words (this has to be a bug in the driver??) but putting a view on the remote...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Pivot, Unpivot and Cross Apply !!!! Nothing seems to work

    What Luis is hinting at is that unless you write code to create the sql statement you want to run each time, the number of columns in your output will...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Pivot, Unpivot and Cross Apply !!!! Nothing seems to work

    I corrected your syntax. Don't forget to place semicolons at the end of your statements or you'll get another error with the with statement.

    WITH data AS(

    SELECT *, ROW_NUMBER() OVER(...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Regarding storedprocedure

    I really have no idea what you are asking, since your procedure doesn't reference the tables you mention at all.

    Do you mean you want to set the amount variable? ...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: t-sql 2008 r2 concatenate

    See the String Functions documentation here.

    For splitting text into columns, you can use the following if the character width of the first two values is always the same:

    select left(denormalizedColumn, 3)...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Linked Server - How to escape reserved-word column names in update?

    yes... Unfortunately I don't own the database in question.

    Hopefully someone knows how to properly escape the names, or some other workaround.



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: cant call extended sp through open query using linked sql for sql server 2012

    I assume you've seen the openquery documentation here (which indicates the same restriction back to 2000)

    So you know can still do the following?

    EXEC [linked_server].[db].[schema].[xProc]

    You can also create a local synonym...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: With Clause in SQL Server Function (UDF)

    Your example is what is called an inline table-valued function, and it works very similar to a view.

    There is also a multi-statement table valued function that allows you to do...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: using dynamic SQL in an OLE DB source for SSIS in 2012

    Hi!

    I don't really know the aswer to your problem, but thought I'd pop in anyway.

    How does the next step in the process handle the dynamic nature of the output? ...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

Viewing 15 posts - 1 through 15 (of 114 total)