Forum Replies Created

Viewing 15 posts - 7,591 through 7,605 (of 15,381 total)

  • RE: Finding the most recently modified row from a group of tables

    Thanks for the ddl and sample data. Using MM's excellent example...

    select IPCode, Max(LastUpdateDate)

    from

    IP i

    outer apply

    (

    select UpdateDate from IP where IPCode = i.IPCode

    union all

    select UpdateDate from AddressProfile where IPCode = i.IPCode

    union...

  • RE: Do i have to use cursor processing?

    TryingToLearn (7/11/2013)


    Thank you very much, and that article is very helpful...may i ask one more bit of advice form you?

    select FilemakerID,

    STUFF((select ',' + cast(Courseid as varchar(10))...

  • RE: Are the posted questions getting worse?

    OK I will show my true American colors here. My wife's company just got a new client in Newfoundland. She is going to have to travel there this fall at...

  • RE: Finding the most recently modified row from a group of tables

    In order to help we will need a few things:

    1. Sample DDL in the form of CREATE TABLE statements

    2. Sample data in the form of INSERT INTO statements

    3. Expected results...

  • RE: Do i have to use cursor processing?

    You absolutely do not need a cursor or any intermediate table for this type of thing. As eluded to by Manic Star you can use FOR XML to do this...

  • RE: Incorrect Syntax?

    Mark Harley (7/11/2013)


    I'm trying to write an sp to query an Oracle db through openquery. The oracle portion of the query I've written works when run through the Oracle...

  • RE: conditional table selection

    Bajrang (7/11/2013)


    Try this..

    SelectDISTINCT Object_Name(Object_Id) AS TABLE_NAME

    , case when Row_Count <= 2 then 'NOT ENOUGH ROWS' ELSE CAST(row_count AS VARCHAR) END NUM_ROWS

    From sys.dm_db_partition_stats

    order by Object_Name(Object_Id)

    That does not do...

  • RE: passing different values into a variable

    PearlJammer1 (7/11/2013)


    Hi

    I have a an SP that returns the size of the backup files into a table. To execute the Sp i have to pass in the paramaters @db and...

  • RE: A little help needed with simple Custom Function

    You are also missing a SET or SELECT on the line with your replace.

    set @strInputString = Replace((@strInputString), ', * *', '')

    I agree with Luis that doing this in a scalar...

  • RE: How to pass parameters in ssrs 2008 through stored procedure? How to get more than 2lakhs data in ssrs-excel?

    subbareddyap (7/11/2013)


    Hi Koen,

    I'm very new of ssrs.

    when i was tried to save the ssrs result set data in excel i'm getting the error.

    For your reference i attached the error image.

    Thanks...

  • RE: Conversion failed due to datatype.

    You're welcome. Glad that worked for you.

  • RE: stored procedure keeps spinning

    riya_dave (7/11/2013)


    hi

    when i run sp in 1 server it keeps spinning and on other server i am getting result

    what could be the reason

    i tried with recompile but no luck

    thanks

    It could...

  • RE: Conversion failed due to datatype.

    sharonsql2013 (7/11/2013)


    Hi,

    I am trying to generate ids as"Compidentity" as varchar .

    If the record is inserted with productcode- " Health"

    Column with value H1 shoul be added .

    If the record is inserted...

  • RE: If Statement in a View/Query

    rayh 98086 (7/11/2013)


    Hello,

    I would like to create a SQL query that will make a decision based on date. For example, if the date is Jun 30,2013 or greater, then...

  • RE: How to add IDENT_CURRENT for foreignkey in procedure?

    insert into onward_journey(departuredate,from_location,to_location,metro,trans_all,mode_of_travel,seat_type,no_of_days,other_details,status_id) values(@departuredate,@from_location,@to_location,@metro,@trans_all,@mode_of_travel,@seat_type,@no_of_days,@other_details,'2')

    set @request=IDENT_CURRENT ('travel_request ')

    return @request

    You have a couple of issues going on here.

    First you are using IDENT_CURRENT. That will get the last identity value for that...

Viewing 15 posts - 7,591 through 7,605 (of 15,381 total)