Forum Replies Created

Viewing 15 posts - 871 through 885 (of 1,183 total)

  • RE: Union Query in Reverse

    Select ident_type_id as Form1_IDs

    from form_ident_types

    where b.form_id = 1

    and ident_type_id NOT IN (

    Select ident_type_id

    from form_ident_types

    where form_id = 7)

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Reporting Services: great difference in report execution time versus the query execution time ?

    That depends. Are you doing a lot of grouping or aggregating in the report? Do as much as possible in the code as the report server isn't nearly as efficient...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Xml Query

    Hmmmm. I guess you can't post XML here...

    STEVE :exclamation: !!!!!

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Xml Query

    Place your XML within "[cod e]" and "[/cod e]" tags and remove the space from the word code.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: complex select problem w history tables, date ranges

    I too would like to know how you keep your formatting!!!:D

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Sql Problem

    OK, well then I may not be going nuts.... :hehe:

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Sql Problem

    Isn't that what DISTINCT means?

    If you have a set of 1,1,1,2,3,3,3,4 are the DISTINCT numbers not 1,2,3, and 4?

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Sql Problem

    Peter, forgive me here (bold is only being used for clarity, not yelling). But ...

    given the table ....

    CREATE TABLE #temp

    (Id int,

    tname varchar(10),

    Email varchar(10),

    Age int,

    Salary int)

    INSERT INTO #temp

    SELECT '1','aaa','1@abc.com',20,1000

    UNION

    SELECT '2','aaa','1@abc.com',20,1000

    UNION

    SELECT '3','aaa','2@abc.com',20,1000

    UNION...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Sql Problem

    No, the count(*) will give you the count of records in that group, not an incremental row number....

    Run your script and you'll see... *grin* :hehe:

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Help with T-SQL Syntax

    Yes' it's a pitty there's no F7 in SMS...;)

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Sql Problem

    You want row_number() not count(*) ....

    CREATE TABLE #temp

    (

    Id int,

    tname varchar(10),

    Email varchar(10),

    Age int,

    Salary int

    )

    INSERT INTO #temp

    SELECT '1','aaa','1@abc.com',20,1000

    UNION

    SELECT '2','aaa','1@abc.com',20,1000

    UNION

    SELECT '3','bbb','1@abc.com',20,1000

    SELECT ID, tName, Email, Age, Salary, recID

    FROM( SELECT ID, tName, Email, Age, Salary,

    ROW_NUMBER()...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Date Question

    Sorry, but that just confused me even more...:w00t:

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Sql Problem

    Can you provide the DDL (definition) for your table. What fields does it contain? Which two fields are required to be "distinct" in your result set?

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: select statement

    Thanks Steve. FYI, I didn't mean the "first" physical record, rather the first record in terms of datetime.

    But anywho, thanks for the better solution Steve.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: select statement

    This solution is taking so many assumptions, it's not funny... but this works

    with the assumptions that

    1. the start date is the first entry in the table.

    2. a phone number...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg

Viewing 15 posts - 871 through 885 (of 1,183 total)