Forum Replies Created

Viewing 15 posts - 13,006 through 13,020 (of 14,953 total)

  • RE: (Riga) WAITFOR DELAY. Can I keep querying until data is found?

    WAITFOR TIME would delay the process till 11 PM.

    What you want to do to make it stop at 11 PM is add something to the While statement:

    and datepart(hour, getdate()) <...

    - 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: How to write CROSS JOIN using subquery?

    Suggest my two-temp-tables-and-an-update method, see if that gets what he wanted.

    - 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: Possible new DBA position leery of the 'test'

    Sounds like, if they get the right job for you, it might be a good opportunity.

    I figured the test would be something like that. I wouldn't be able to...

    - 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: sp_send_dbmail error when quotes are in @query parameter

    First, assign the string to a variable. Then, use two-single-quotes where you want single-quotes in the string. Then use the variable in the parameter.

    declare @Q varchar(1000)

    select @Q =...

    - 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: np of hits

    Not sure exactly what you mean by "number of hits". If you mean how many queries it sends to the database, you can run a trace to track that....

    - 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: Alternative to FILEPROPERTY for used/unused space?

    Why would you have to make it a proc to use a function like FileProperty? Just set the right columns to be the input parameters, and use Cross Apply...

    - 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: Dynamic Database Size Query

    You could select from the sys.sysaltfiles DMV, and use a running total expression for the size. That would give you what you need.

    - 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: Import flat file into existing table using wizard

    Where it displays the target table, you can either type in an existing table, or click the down-arrow next to that and it will let you select an existing table.

    Make...

    - 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: Please help me with this query

    Try something like this:

    WITH EmployeeSubordinates (EmployeeID, LastName, FirstName, DistinguishedName, Mail,

    Manager,Tier,Seq) AS

    (

    SELECT

    ...

    - 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: Updated Can't figure out how to write the query!!

    It appears to me, from the limited data given, that this should do what you need:

    select distinct tblClientImport.StmtNum, tblStatements.Stmt,

    tblStatements.Count_Range, tblStmtChar.CharNum,

    tblCharactersists.Characteristic

    from tblClientImport

    inner join tblStatements

    on tblClientImport.StmtNum = tblStatements.StmtNum

    inner join tblStmtChar

    on...

    - 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: single quotes to sql server stored procedure

    Make it two single-quotes in a row.

    'O''Donnal'

    'Sam''s'

    - 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: Session ID

    DTC can generate negative SPIDs.

    - 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: Handling Huge SQL Database

    On the first question, it depends on your data, indexes and what your query is doing. I would guess that 10 years data would be 10 times as 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: Bulk Insert and Index Considerations

    Is it possible for you to have some sort of LoadDate or BatchID in the clustered index? If so, then that will really expedite your re-indexing process. If...

    - 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: Problem with sqlserver2005

    Have you run UpdateUsage and CheckDB and updated all the statistics in the 2005 version of the database? (Assuming this is a migration from 2000 to 2005.)

    - 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 - 13,006 through 13,020 (of 14,953 total)