Forum Replies Created

Viewing 15 posts - 1,081 through 1,095 (of 1,539 total)

  • RE: Retreive records without cursor

    Christopher Stobbs (6/17/2009)


    My other concern is that using the MAX on the "Identity" of the postings table is prob not a good idea as this does not mean 100% that...



    Pradeep Singh

  • RE: Retreive records without cursor

    Christopher Stobbs (6/17/2009)


    Why is there an Office field in both tables?

    Did you want the office from the employee or from the posting returned?

    I was confused too!! but didnt ask:w00t:. That's...



    Pradeep Singh

  • RE: Retreive records without cursor

    Glad I could help 🙂



    Pradeep Singh

  • RE: Retreive records without cursor

    forgot to paste the results.

    OUTPUT:-

    ---------

    empno name office startdate

    ----------- --------- ----------- -----------------------

    1 ...



    Pradeep Singh

  • RE: Create database fails when executing in SP

    I'm getting same error... it seems create database doens't accept variables.

    not even with sp_executesql.



    Pradeep Singh

  • RE: Retreive records without cursor

    create table employee

    (empno int,

    name varchar(100),

    Office varchar(100))

    create table Posting

    (

    ser int,

    empno int,

    office varchar(100),

    startdate datetime

    )

    Insert into employee

    select 1,'pradeep','mumbai'

    union

    select 2,'kumar','pune'

    union

    select 3, 'singh','bangalore'

    insert into posting

    select 1,1,'delhi', getdate()-200

    union

    select 2,1,'noida',getdate()-100

    union

    select 3,1,'mumbai',getdate()-10

    union

    select 4,2,'pune', getdate()-2

    union

    select...



    Pradeep Singh

  • RE: Create database fails when executing in SP

    What is the error message that you're getting?



    Pradeep Singh

  • RE: Retreive records without cursor

    Yeah. And as rightly pointed by Christopher, use GROUP BY and MAX...



    Pradeep Singh

  • RE: Retreive records without cursor

    select emp.empno, emp.name, posting.office, posting.startdate

    from employee emp Inner Join Posting

    on emp.empno=posting.empno

    Pls post the table structure with sample data for better answers.



    Pradeep Singh

  • RE: Late Subscription Notifications..?

    Not this issue but yesterday i wasn't able to see the Longest thread "Are posted questions getting worse" in the active thread list even when there were lots of new...



    Pradeep Singh

  • RE: RESTORE JOB FAILS

    What is the max number of threads on ur server?



    Pradeep Singh

  • RE: SQL Server Instances

    Wintop (6/17/2009)


    Is that the same installing 2 difference version of sql servers on same machine?

    Yes. You can install same version of SQL Server multiple times as well. There is limitation...



    Pradeep Singh

  • RE: no idea plz help

    If you add a new table on the publication, u need to generate a new snapshot and re-synchronize.



    Pradeep Singh

  • RE: extact last 3 characters from a string

    shiwani2002sg (6/17/2009)


    i wish to extract last 3 characters of a string, in sql server 2005,.

    substring doesnt accept -3 as length. so plz suggest some way

    ex helloALL

    output :...



    Pradeep Singh

  • RE: I need to delete 400,000 records

    http://www.mssqltips.com/tip.asp?tip=1294 shows many ways how you can find out dependencies (eg. there might be an index that is dependent on your base table).

    Once you know what all objects(index, constraints...



    Pradeep Singh

Viewing 15 posts - 1,081 through 1,095 (of 1,539 total)