Forum Replies Created

Viewing 15 posts - 8,626 through 8,640 (of 13,460 total)

  • RE: tables that were deleted still appear when query

    doesn't sound right, as that would require a corrupted database...

    lets go back to basics...you dropped some tables...are you sure it was THAT database, and not another database that they were...

    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 Most costly queries

    terisita i've usually used a server side trace to capture all the DML queries, then order the results on some of the columns in the trace to see whathas high...

    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: substring or charindex?

    another option is to use STUFF to insert 01/20 into the middle of 02/11 to produce 02/01/2011

    here's a simple example :

    /*--Results:

    2/01/2014

    12/01/2016

    4/01/2023

    1/01/2018

    12/01/2018

    */

    SELECT STUFF(TheFinalResult,CHARINDEX('/',TheFinalResult) + 1,0,'01/20') As TheFinalDate

    FROM (

    SELECT '2/14'...

    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: Identify duplicate indexes

    there's a large number of scripts in the contribution section for this;

    I've used "The Ultimate Duplicate Index Finder" myself;

    take a look here:

    http://www.sqlservercentral.com/search/?q=duplicate+indexes&t=s

    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: Run project from thumbdrive

    are you including all the custom DLL's your project is referencing?

    dlls that are part of the target framework (2.0.3.5,4.0 etc) do not have to be copied local, but 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: New Database role not adding 'db_datareader' as a securable

    this is how i usually create a role and then add various built in roles to it;

    I hope this helps

    CREATE ROLE [MyRole]

    ALTER AUTHORIZATION ON SCHEMA::[db_ddladmin] TO [MyRole]

    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: How to find the size of file in KB with sp_OAGetProperty

    here's a slight modification chopping up the results into file date,filesize and filename:

    SELECT

    SUBSTRING(txtResult,1,20) AS FileDate,

    CASE

    WHEN txtResult LIKE '%<DIR>%'

    ...

    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 find the size of file in KB with sp_OAGetProperty

    if the only thing you are after is file size, the DIR command is faster and easier to use to get it; now if you are after information like modified...

    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: substring or charindex?

    it's kind of hard, but you have to make some assumptions based on the sample data.

    i'm assuming:

    there are TWO chars after the slash to capture.

    there is always a space before...

    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: Bold the Headers in CSV

    preensheen (10/1/2010)


    hey, CSV is more like a excel but not like text. So I am assuming there should be way we should be able to do it. May be 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: I would like to insert from the clipboard text with line breaks in a "varchar" column.

    no, whatever you paste is whatever you paste....

    the GRID, by design, cannot show multiple rows...(it's a grid), so for presentation purposes, it replaces CHAR(13) and CHAR(10) as spaces...but the underlying...

    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: Disabling writing to Windows Application Event Log

    right click on the servername...properties...the security tab:

    change to failed logins only, and i think you are all set.

    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 would like to insert from the clipboard text with line breaks in a "varchar" column.

    in the object explorer on the left, expand your database till you see the table.

    right click on that table , and selecte the "Edit Top 200 rows;

    you can always change...

    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: Implementing SELECT sql_text FROM v$sql; of Oracle in SQL 2008

    from a similar post a while back, someone cobbled together an enhanced version of sp_who, which has an additional xml column of the command being executed.

    try this version, named sp_who3:

    /***************************************************************************************************************...

    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: lost all permissions

    if you restored a database that came from a different server, this is a known issue;

    USERS in the database are mapped to LOGINS in the master database;

    the sql user...

    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 - 8,626 through 8,640 (of 13,460 total)