Forum Replies Created

Viewing 15 posts - 10,201 through 10,215 (of 13,460 total)

  • RE: Convert GETDATE() to NUMBER

    that is exactly why you'd want to not store a date as a number: 20091221 you can kind of read as a date, but what if the value is 20091250...

    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: Identity column maxed out

    you'll want to use the GUI in SSMS;and change it to bigINT; the GUI will create a new table witht he proper structure, migrate the data, migrate all the foreign...

    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 GETDATE() to NUMBER

    it depends on what your "number" is going to be;

    SQL natively keeps the number of days since 01/01/1900:

    select convert(decimal(12,0),getdate()) = 40167

    select convert(decimal(12,4),getdate()) = 40166.5383

    after the decimal point, it is 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: Fill Factor Calculation

    fill factor depends on the flavor of inserts, so it's not something that can use a rule of thumb/assumption;

    for example, if the primary key of a table is date...

    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: Text Editor for Very Large Files

    thanks for the input guys;

    for my first pass of fixes, i used gvim, but it's not the kind of utility i'm used to...i prefer text editors that open multiple files,...

    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: i need logic to get the days for most recent week that ends with Friday

    dates can seem tricky until you get used to them.

    never convert a date to varchar or anything...always keep them in datetime .

    this will give you the Monday of the current...

    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: "OR" statement in JOIN query

    Pete there is a difference between Joining and using a WHERE statement to limit your results; I'm thinking that you are including the WHERE statement as part of the join,...

    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: enable/disable xp_cmdshell before/after Windows schedule task

    As Jeff's link pointed out, you can easily script the enabling and disabling of xp_cmdshell;

    if you had checked BOL before posting a question here, you'd have found it yourself, 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: SQL Trigger multiple update issues

    good job posting details Bryan! that gives us just what we need for testing.

    with the table definitions, we can emulate what you are doing, and provide solid comprehensive answers.

    now we...

    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 XML file and copy it to Remote Web Server

    details, that's the key.

    you said you want to put XML in the following folder:

    c:\AllSites\romah.com\ folder of target

    does that mean the web server and the sql server are the same...

    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: SQL Trigger multiple update issues

    if you are getting a specific error, we really need to see the code in your triggers; that's where the error lies; it sounds like you have declared variables 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: Find triggers which relate to a specific table

    still fairly easy: you jsut add the dependancies and the columns to teh same query:

    SELECT

    CASE

    WHEN object_name(tr.parent_id) IS NULL Then 'Database'

    ...

    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: Find triggers which relate to a specific table

    here's an example of what Jason was talking about; my SandBox database had a database trigger, and I thought that deserved mentioning and a demo of special handling:

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

    the best way is to switch to your own cursor, and do whatever you were going to do to the specific tables;

    here's a generic example; note how you could exclude...

    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: SQL server DR

    DR = Disaster Recovery.

    a SQL disaster Recovery Regime would simply be the steps you plan to take to bring SQL server back up in the event of a disaster...whether 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,201 through 10,215 (of 13,460 total)