Forum Replies Created

Viewing 15 posts - 12,301 through 12,315 (of 13,460 total)

  • RE: Unstring text field?

    Jeff Moden (10/15/2007)


    Heh... too bad I don't have SQL Server 2k5, yet... would be an interesting test 'cause, you're right, Regex is very fast.

    The fastest option, though, would be to...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Could anyone help me on this query

    which RID? if you group on R_ID AND FilterDesc, you get the whole table...

    SELECT SUM(RowsCount)AS SUMROWCOUNT ,FilterDesc

    FROM @SAMPLE

    GROUP BY FilterDesc

    maybe you mean you want the r_ID ANd the totals?

    select S.R_ID,X.SUMROWCOUNT...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Could anyone help me on this query

    here's how i would do it:

    --sample data for testing:

    DECLARE @SAMPLE TABLE(R_id int, ProductCode varchar(4), FilterDesc varchar(50), RowsCount int, FilterCount int)

    INSERT INTO @SAMPLE

    SELECT 99 ,'APUS','After all non HK removed', 6, 0...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Delete Temp Table within a Cursor

    it looks to me like you are inserting

    data into t_SRateTable, but doing it in a RBAR(Row-By-Agonizing-Row Basis) (--Jeff Moden 2005-2007)

    It seems like you could just insert the whole batch.

    the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Viewing object owners

    Am i reading the question correctly? you are trying to find out if an object has changed owners? or are you trying to audit WHETHER a login has issued the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Is it possible to send the resultset batch by batch from SQL?

    well first thing i would do is at the top of the procedure, Id issue this command:

    SET ROWCOUNT 10000

    that way, no matter what filters/conditions were passed or not, i return...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Is it possible to send the resultset batch by batch from SQL?

    I agree with colin; a master procedure to handle things in batches is a great idea....I'd question whether a user interface really needs to look at a million records, or...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Bulk Insert

    i would lean towards the data not being in the expected format....maybe it's a unix based file, and contains only \r for the rowterminator and not , which is Carriage...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Script for DB reindexing

    take a look in the scripts section:

    http://www.sqlservercentral.com/scripts/Index+Management/30139/

    the above is a script to reindex all tables.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: sheduling pakages as job fails

    it's all there:

    n:Login failed for user 'sa'.

    you must have mis typed the password. reenter it, and if permissible, run it right now on demand, instead to confirm it runs.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to Select duplicated records in a table into new table OR Delete all unique records in a file!

    you had almost everything you need...you simply want to sub select:

    SELECT * FROM CustomerRecords

    WHERE SSN IN (SELECT SSN

    FROM CustomerRecords

    GROUP BY SSN

    HAVING (COUNT(SSN) > 1)

    ) X

    ORDER BY SSN

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Determine field names of stored proc return

    it's not blindingly obvious, but in QA when you do a SELECT INTO statement, to dynamically make a new row, the table that gets created from the data is created...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Can't RAISERROR for message 1205

    sure you can, you just have to raise the error yourself:

    begin

    [logic for determining if an issue appears here]

    declare @err varchar(400)

    set @err='Transaction (Process ID ' + convert(varchar,@@spid) + ') was deadlocked...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Can't RAISERROR for message 1205

    Ironically, the error given is the answer.

    error numbers belwo 50,000 are reserved, and can only be raised by the SQL Server engine. you can read the list of error...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Determine field names of stored proc return

    when run in QA or anything like that, yes only column names appear...the rest is hidden.

    when placed in a client side data table or ADODB.Recordset. the attributes like data type,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 12,301 through 12,315 (of 13,460 total)