Forum Replies Created

Viewing 15 posts - 12,841 through 12,855 (of 13,460 total)

  • RE: Data types / lengths and primary key efficiency

    if the fields are indexed, then technically the CHAR fields would take up more space, which would mean less data per page of memory; more data per page is better,...

    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: Running total in reverse order.

    sorry about the confusion.

    in my sample, these two tables are the same: #TESTDATA = gdb_01_4_test

    i didn't have the data, so i had to create it to confirm that my sample...

    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: Data design/ datetime

    there was a post today referencing "Death By SQL", where the user slowly kills himself by separating date and time, when they can be stored in the same field....I think...

    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: Simple query

    SELECT DISTINCT PolicyNumber

    from GE_Transaction

    WHERE Status='A' AND MonthReported < DATEADD(year,10,EffectiveDate)

    i reversed the argument;

    i don't know that MonthReported is a valid date, you'll have to evaluate with data to see if...

    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: Simple query

    SELECT DISTINCT POLICYNUMBER WHERE STATUS='A' AND MonthReported < DATEADD(year,EffectiveDate,10)

    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: Running total in reverse order.

    based on your example data, I assumed that Flight 38 for example might have more records added at any time; because of that, if I created another table with 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: Updating a table using a Stored Procedure as source

    i believe you need to create a temp table to capture teh results of the stored proc as one step, and then update from the temp table.

    alternatively, you might 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: Help! - Removing non-alpha and spaces from a field script..

    I'm suprised noone mentioned the regular expression extended stored procedures:

    http://www.sqlservercentral.com/columnists/mcoles/sql2000dbatoolkitpart2.asp

     

    with that you can search, select or replace things patterns like this ; it's a bit easier than looping thru...

    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: alter constraint

    Ronald is right, in Enterprise Manager, it appears that you can edit an existing, but if you profile the database, you will see it is really dropping the constraint, and...

    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: Problem with removing FileGroups

    glad it helped, RSingh;

    i was thinking along those same lines awaiting your reply...maybe some indexes are in the filegroup, but not the objects they index;

    way to go!

     

    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: Problem with removing FileGroups

    the sql below might help; it identifies objects and the filegroup they belong to;maybe something is not moved off of the filegroup yet?

    select sysobjects.name as TableName,

          s.groupname as Data_located_on_filegroup

    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: Running total in reverse order.

    just use the table to store the raw data, and use a VIEW to total up the information. if you try and store totals in the same row 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: VB.NET datatable into SQL table - what is the best way??

    I took his question to mean if you created a datatable in vb.NET, then inserted data into it, how can you create the table on SQL server, and then insert...

    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 date of birth to Age

    if this is for oracle, here is a function in oracle syntax that returns the age:

    CREATE

    OR REPLACE FUNCTION

    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: Help from experienced Guru with the temp table

    if you do not have SELECT privileges to the table, you cannot get the data into a temp table for manipulation.  there is no work around.

    if you only have 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!

Viewing 15 posts - 12,841 through 12,855 (of 13,460 total)