Forum Replies Created

Viewing 15 posts - 19,126 through 19,140 (of 49,552 total)

  • RE: fetching date from 1 sp to another

    declare @row1 datetime

    set @row1 = @fromYTD

    while(@row1 < @Todate)

    begin

    select thrudate from item3

    set @row1 = DATEADD(MONTH , 1 , @row1)

    ...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    hbtkp (4/13/2012)


    how to check while loop and increment date by 1 month in while loop

    The code you posted does exactly that.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    hbtkp (4/13/2012)


    create function function_name(@returndata [varbinary](max))

    return table

    field1 dattype,

    field2 datatype

    )

    That is not a function definition.

    if i didint found ,i need fetch from another function and put into this function

    For the 3rd time,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    hbtkp (4/13/2012)


    simple logic,

    I did not ask for 'simple logic', I asked for the definition of the function. As in the CREATE FUNCTION statement.

    Also, what do you want to do if...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    What's the definition of the function item2?

    What does it return, a single value or a resultset?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    hbtkp (4/13/2012)


    help me with this code

    its not showind date

    declare @row1 datetime

    set @row1 = @fromYTD

    while(@row1 = @Todate)

    begin

    select thrudate from item3

    set @row1 = DATEADD(MONTH , 1 , @row1)

    end

    What is this supposed to...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    hbtkp (4/13/2012)


    ok.

    this dates are in 1 udf and i need to add in another udf.

    Once more with feeling...

    You cannot add data to a udf. A udf is just a query...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Estimate savings of backup compression

    The proc is for database compression and unfortunately it's only available in editions of SQL that support database compression (SQL 2008+, Enterprise, Developer and DataCenter edition). So either way, you'll...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: fetching date from 1 sp to another

    Missing in that you have column with dates and you want to see which dates are not represented in the table.

    First thing you need for that is a calendar table...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: how can i insert in udf

    capn.hector (4/13/2012)


    Duplicate post all replies here http://www.sqlservercentral.com/Forums/Topic1282601-392-1.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Implicit conversion from datatype......

    logicinside22 (4/13/2012)


    Hi

    Are you able to solve this error ?I am working on it also . Let me know what steps you took to resolve this please.

    thanks

    Also asked here:...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Are the posted questions getting worse?

    SQLRNNR (4/13/2012)


    It is soooo fun to google a question and come back to a blog you wrote.:hehe::hehe::hehe:

    I hate it when that happens. Had a couple cases where google turned up...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Move File contents to other

    What elaboration do you need?

    If you want syntax, look up CREATE INDEX with the ON clause and the DROP_EXISTING clause.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Move File contents to other

    1) Rebuilds the indexes that you want to move and specify ON <desired filegroup>, and remember that the clustered index is the table.

    2) Read up on proportional fill.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Msg 257, Level 16, State 3, Procedure procReceiveDeadLock_Graph, Line 28 Implicit conversion from data type xml to nvarchar(max) is not allowed. Use the CONVERT function to run this query.

    As I said...

    GilaMonster (4/13/2012)


    So, check the data types of the columns in the table, check the data types of the variables and fix whichever is incorrect.

    The column is nvarchar, the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 19,126 through 19,140 (of 49,552 total)