Forum Replies Created

Viewing 15 posts - 14,806 through 14,820 (of 14,953 total)

  • RE: How do I insert data in a table which is used on the web?

    One way, which requires a little work, but not too much, is to use a partitioned view instead of a table for the web page.

    When you're ready to import the...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: What T-SQL commands exist which can be used in Query Analyzer to export a select statement within a stored procedure?

    Never mind. The web page was truncating part of the subject.

    On the question: "What T-SQL commands exist which can be used in Query Analyzer to export a select statement...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Help! I'm a DBA! How did that happen?

    "So much to accomplish, but first, I have to figure out these tricky RIGHT OUTER joins ..... "

    Table1

    ID

    1

    2

    3

    Table2

    ID

    1

    4

    5

    Inner Join:

    select *

    from Table1

    inner join Table2

    on Table1.ID = Table2.ID

    Result

    1 ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: LIghter fare - Doh! Querys

    I just had to fix a database that had 14 tables (out of 60 total tables) with identity columns, but no primary key or clustered index defined. Another table...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: nested cursors , where oh where am I going wrong with this

    You're declaring @TBL as a varchar, then trying to select from it. You can't select from a varchar variable.

    Either @TBL needs to be declared as variable type "table", and...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: What T-SQL commands exist which can be used in Query Analyzer to export a select statement within a stored procedure?

    Are you seriously looking for someone to type up a full list of all T-SQL commands and examples of their use?

    If so, I highly recommend opening up Books Online and...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Permissions Question

    I agree with Roy. Creating a role with the correct (minimum) permissions to get the job done will allow you add more users, etc., to that role as appropriate,...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: 2005 Maintenance Plans

    Personally, I'd just set up a separate job to back up the transaction log, and schedule it to run as often as you feel is necessary. Don't take it...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Help! I'm a DBA! How did that happen?

    DonaldW (1/18/2008)


    "Basically agree with you DonaldW.

    One experience I had, though, makes me put at least this warning on that idea.

    I had a query that joined a table, through a many-to-many...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Format Date in SQL Table

    keywestfl9 (1/18/2008)


    select convert(varchar(20), cast(datefield as datetime), 101)from dbo.table where datefield is not null

    i replaced datefield to my column name which is of nvarchar(50) containing dates and the table name.

    but i...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Multiple Groupings

    And, of course, Matt posted the same correction to his Order By while I was writing mine. 🙂

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Multiple Groupings

    You would need to add ActionID between OrderID and Ranking in Matt's example, in the Order By statement. Otherwise, you'll get all the Actions and then all the Parts,...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Multiple Groupings

    The easiest way to do this would be to do inner joins between the tables, select the columns you want, and then have the front end application do the layout...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Format Date in SQL Table

    He's already mentioned that the column is being changed to datetime. He just wants to reformat it first (didn't say why). So, he's on the right track and...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Subquery syntax?

    select NameID, Specialty, ColX

    from dbo.MyTable

    inner join

    (select min(MyTableID) as MinID

    from dbo.MyTable

    where Specialty = 'X1'

    group by NameID) Sub1

    on MyTable.MyTableID = Sub1.MinID

    That will give you...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 14,806 through 14,820 (of 14,953 total)