Forum Replies Created

Viewing 15 posts - 11,491 through 11,505 (of 13,460 total)

  • RE: some action before select

    ok a few ideas;

    first to be clear, there is no way to update the data "before" a select statement gets called.

    While I know it's possible for the data to be...

    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 proc help needed

    what have you tried so far?

    you can find all the modified dates and creation dates in sys.objects;

    filter the type column for types like 'P' and 'FN', etc

    sp_helptext gives you 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: Please Help Me...

    you have to create a trigger for each table you want to audit. it's rare that you really need a trigger on EVERY table...just specific ones is more common.

    look in...

    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 give permissions to a stored procedure only?

    readonly permissions?

    stored procs only have EXECUTE permissions...

    do you mean to read the text of procedure from sp_helptext procname,

    or

    permission to execute EXECUTE the procedure, but have only READONLY permission...

    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: 300+ records deleted 2 days ago

    I'm assuming 's one specific table right?

    restore the backup under a different name... once it'se you can investigate what data is missing, and check other tables for missign data as...

    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: Converting Minutes to HH:MM:SS

    here's a step by step, using the DATEADD function, which is hte better way to tackle this i think:

    as far as positive or negative, you'd want to handle that as...

    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: Generate UNIQUE VARCHAR Identifier?

    you are on the right track as using an identity to help generate the varchar; that's the way we've suggested it for similar issues.

    like JKSQL said, the way to do...

    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: question, urgent please!!!

    here's an example:

    create table test (id int identity, category varchar(100),

    name varchar(100), allnames varchar(8000) null)

    insert test (category, name)

    select 'fruit', 'apple' union

    select 'fruit', 'pear' union

    select 'fruit', 'orange' union

    select 'meat' , 'beef'...

    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: some action before select

    the other important question is, how often does the remote data change? what is the time tolerence for the application(is it bad that the data is 1 min/10 min/1 day...

    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: some action before select

    it sounds like if someone runs a SELECT command, you want to make sure you have the "latest and greatest" data from remote servers/locations, is that right?

    instead of running yourstored...

    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: Modifying a stored procedure in a remote database using inline SQL statement

    just remove the GO just before the ALTER command:

    SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO

    changes to

    SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON

    i would simply pass the ALTER...

    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: selecting * while using distinct....

    excellent post by providing the table and data...thank you!

    The thing is, DISTINCT is used against all selected columns...so if you select * from 3 tables, you probably are not going...

    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 exit out ofa script if it fails Halfway during execution?

    in SSMS or Query analyzer, you can't...as you identified, the GO statements start a new batch, and you can't interupt the processing of the batches without raising an error severity...

    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: Create a Federated Table in SQL Server 2005

    a Federated Table is kind of neat in MYSQL: basically Federated tables are tables with storage in a remote server.

    The closest equivilent in SQL would be a view which points...

    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: Constraints to Check Database & Tabke Existence

    well the way to do it is to add a check constriant on the column, and the check contraint uses a user defined function:

    CREATE TABLE WHATEVER(

    WHATEVERID INT,

    DBNAME sysname CHECK(dbo.CheckDBName(DBNAME)...

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