Forum Replies Created

Viewing 15 posts - 10,981 through 10,995 (of 13,460 total)

  • RE: Lost Data! Can I query for what happened?

    you'd be looking for a DELETE or TRUNCATE command; there's nothing in place to look at where it happened.

    the default trace would have information if the table was dropped, but...

    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 Schedule a SQL Trace ?

    here's what i do:

    i create a view for any trace i create, so I can easily access it.

    here's a code example:

    --review all my traces

    select * from sys.traces

    --find the path 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: a basic trigger

    excellent. with the table definitions it is REALLY easy for us to help. good job providing us with that.

    here's a basic example that works; note the key is to use...

    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: Add in another column that sum of fields in same table

    this is known as a "running totals" problem. running totals require a defined ORDER BY...wkether it is a PK, or alphabetically, or whatever...your example so far does not meet 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: Check given number

    here's the first way i thought of: compare the value to the convert(,int) of itself.

    declare @number decimal(18,4)

    Set @number = 10.0

    --here's one way, compare the value to the integer conversion of...

    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: Convert int date(YYMMDD) to datetime

    the CONVERT function has a third parameter which has some built in formats for converting datetime to varchar:

    char to datetime:

    select convert(datetime,'090611',12)

    --results:

    2009-06-11 00:00:00.000

    and going the other way, datetime to char

    select convert(varchar,getdate(),12)

    --results:

    090611

    using...

    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: remove state from city/state column

    Andras gave you an example; we thought you could extrapolate.

    note the assumption that with the data, there is always space and then the two digit state code.

    here is a...

    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: KILL

    that would be normal....if i started an insert or update that was tweaking a million rows, and then tried to cancell it, it certainly might take a while to rollback...

    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 find the type 'IEnumerator'

    i think you are missing a reference; try adding

    Imports System.Collections

    to the top of your class. IEnumeration is a member of System.Collections.

    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: KILL

    Tara (6/10/2009)


    I am just confused with this 2 processess.

    Does sql server roll back the transaction when i cancel an insert query from the query window, does it act as 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: Create exclusive lock for a period of time

    the issue is the way exclusive locks work.

    a lock prevents the SELECT,UPDATE/INSERT/DELETE of the table.

    it does not prevent the selecting of the current ident value, or reviewing of any other...

    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 exclusive lock for a period of time

    why are you selecting @CurrentId from an identity value manually? INSERT into the table and get the Scope_Identity() its the right way to do it. it looks like you are...

    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: Select pairs from one table not in another?

    andy.gear (6/10/2009)


    So I have two tables that have two fields that are the same. How do I find pairs in one table that are not in another table? ...

    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: List of Names

    this might help a little bit:

    the Us Census Bureau put together the most common male first names, female first names, and most common last names:

    http://www.census.gov/genealogy/names/names_files.html

    90% of the names 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: Syntax error near select.

    you won't have any problem with the SELECT @variable, 'Any constant',col1,col2 from SomeTable Format; it's very common to need to do that.

    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 - 10,981 through 10,995 (of 13,460 total)