Forum Replies Created

Viewing 15 posts - 16 through 30 (of 58 total)

  • RE: duplicates in resultset

    I ran that insert SP and this is all I get back...am I missing something here?

     

    INSERT INTO [attorneygroup] ([AGid],[AGgroupName],[AGcomments],[AGenteredBy],[AGenteredDate],[AGmodifiedBy],[AGmodifiedDate])VALUES('AG0','Sample Attorney Group','Sample Comment','Admin','Oct  9 1999 12:00:00:000AM','Admin','Oct  9 1999 12:00:00:000AM')

  • RE: duplicates in resultset

     

    Thanks RGR! 

  • RE: duplicates in resultset

    Hi guys,  if I generate sample data with that stored procedure that RGR provided the link for, will it screw up the data in my DB?

    I was going to use...

  • RE: duplicates in resultset

    Well, I can't believe you guys want to read all this, but here's my tables/views.

    I'm still working out how to generate sample data without screwing up the data that's...

  • RE: duplicates in resultset

    well, this is a big azz car...like a 77 caddy.

    Seriously it's huge, check out this rediculous query:

    SELECT DISTINCT TOP 100 PERCENT UdeptManager, Uname, IOofficeName AS Office,

                              (SELECT     SUM(Workable)

                                FROM          studentcounts...

  • RE: duplicates in resultset

    Thanx RGR, I thought posting all the stuff all the time would get annoying...but if you like it, I'll give it to ya.

     

     

  • RE: if / else statement?

    Sam T,  thank you

    I don't think this would work with my query.  Because I am not directly pulling the office names, I am...

  • RE: if / else statement?

    SQL Bill,

    Oh I see.  So modify the user table, and add another column as you say.  The column would be exactly like the real one, but James2 would be different?

    So...

  • RE: if / else statement?

    Thank you Vladan, I tried your code, and it runs, but instead of taking the values from James2 and adding them to the correct department, it just deletes James2 from...

  • RE: if / else statement?

    Hi Vladan,

    I ran your query and I get this error:

    Invalid column name 'trueofficeID'.

     

    I don't have a column called trueofficeID...do I need to create one?

     

    select AOofficeName as Office, count(ARid) as totReferrals

    from...

  • RE: if / else statement?

    Wow...so do I need to use both queries with a GO between them?

    Is this any better or worse than using a CASE statement as RGR suggested?

     

    Thank yoU!

     

     

  • RE: if / else statement?

    really? that'll work?  I will work on it tonight.

     

     

  • RE: if / else statement?

     

    well, let me type it out to help me think.

    I'm doing a query that counts the total amount of referrals. (count(ARid) as totReferrals)

    each entry...

  • RE: if / else statement?

    RGR'us,  I see what you are doing.  You are combining the two usernames as one.  But I think I failed to explain(as usual) what I'm actually stuck on.

    James works for...

  • RE: if / else statement?

    RayM,  I don't quite understand how adding username to the query will fix the count issue I am having.

    Is that where the sum(case) comes in RGR'us?

     

    Thank you gentleman!

Viewing 15 posts - 16 through 30 (of 58 total)