Forum Replies Created

Viewing 15 posts - 11,161 through 11,175 (of 13,460 total)

  • RE: List Encrypted Objects

    as far as i know, you have to select the encrypted column from syscomments:

    select object_name(id), encrypted, * from syscomments where encrypted 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: TSQL Progress printouts in a loop

    instead of printing, you have to use RAISERROR instead to get your ongoing progress:

    --print error immediatly in batch

    while 0=0

    begin

    raiserror ('my Progress So far....',0,1) with nowait

    waitfor delay '00:00:05'

    end

    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: Query Performance

    i didn't see the execution plan as getting attached; can you re-post it?

    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: cannot "save query results as.." tab delimited file

    yeah for big datasets, bcp is the only way to go;

    here's an example, works perfectly, creates a tab delimited file:

    exec master.dbo.xp_cmdshell 'bcp master.dbo.ALLCITYZIPCOUNTYSTATE out c:\sampleout.txt -S localhost\SQLExpress -T -c -t...

    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: cannot "save query results as.." tab delimited file

    quick and dirty is to use grid mode, select the results and copy, then paste directly into Excel;

    it pastes right in as tab delimited automatically..

    i don't know if you can...

    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: Get value from tables

    a typical example from SQL server's metadata:

    SELECT

    sysobjects.name As TableName ,

    syscolumns.name As ColumnName

    from sysobjects

    inner join syscolumns on sysobjects.id = syscolumns.id

    where sysobjects.xtype='U'

    order by syscolumns.name,syscolumns.colid

    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: Filter in a query

    sorry i mis understood, i thought you wanted each of the lower TASKs..

    in that case, i'd use the row_number() feature and an outer select:

    SELECT * FROM (

    select row_number()over (PARTITION BY...

    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: Stored Procedures, who did change this stored procedure

    you can use the default trace, and hopefully find what happened;

    here is aan example:

    -- obtain file name for Default Trace

    declare @TraceFileName nvarchar(256)

    set @TraceFileName = (select path from sys.traces where...

    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: Newbie to SP

    search the "Scripts" section here on SSC for "Split Function"

    there are a lot of great contributions there;

    they typically expect a varchar string and a delimiter to split them by:

    for example:

    select...

    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: Filter in a query

    here's an example which gets the lowest task for each row; you simply compare the column values in a case statement. that will get you started on which tasks 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: Query for Insert (Based on comma)

    you started a second thread on the same issue.. a lot of posters asked for clarification, and you never replied.

    we really need an explanation of the format of the string.

    you...

    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: Linked Server Oracle OLEDB Driver Missing

    you have to install the Oracle Client tools on the server, set up the TNSNAMES.ORA and SQLNET.ORA files so you can actually connect with SQLPLUS or other Oracle utilities like...

    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 lock tables without putting the database in single user mode?

    I answered in the other thread that was alonst the same subject:

    a specific example for you:

    create proc test ()

    as

    begin

    BEGIN TRAN

    update table1 WITH(TABLOCKX)................

    Insert into table 2 WITH(TABLOCKX)...................

    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: Set database in single user mode - broke connection

    not sure why you'd want to lock a table up, but I would do it with a transaction.

    one of the HINTs you can use is to exclusively lock a table:

    From...

    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: what the decrypt function in Ms Sql Server ?

    interesting;

    i used the default trace and my own DML trace to see what it was doing.

    the code you posted executes and created a stored procedure.,

    the procedure gets encrypted, so...

    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 - 11,161 through 11,175 (of 13,460 total)