Forum Replies Created

Viewing 15 posts - 1,996 through 2,010 (of 13,460 total)

  • RE: Linking a Parameter to multiple values

    the union logic, assuming you have indexes on each of the Pend columns would be the best solution.

    the OR would work, but perform horribly on big tables.

    do you have indexes...

    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 have a field that has data like this and I need to pull out what is between the "-" and "x" 5.625X11.25-2.875x8.5 would be 2.875

    search for the DelimitedSplit8K function, and understand the article.

    then it's just a matter of chopping up the strings:

    /*--Results

    jmaPartShortDescriptionItemItemItemItemItemItem

    5.625X11.25-2.875x8.5 5.625X11.252.875x8.5 5.62511.252.8758.5

    5.625X35.25-2.875x32.5 5.625X35.252.875x32.5 5.62535.252.87532.5

    22.5X9.75-9.5x19 22.5X9.759.5x19 22.59.759.519

    28.5X9.75-9.5x25 28.5X9.759.5x25 28.59.759.525

    40.125X9.75-9.5x36.625...

    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: Linking a Parameter to multiple values

    wouldn't that just require a bigger WHERE statement?

    WHERE Pend1=@param

    OR Pend2=@param

    OR Pend3=@param

    OR Pend4=@param

    OR Pend5=@param

    t 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: How to find Domain User Name connect to Database through Application

    you cannot detect the end user's domain account directly.

    maybe you could loosely infer it.

    because your application is using a "common" login, only the application knows who it is;

    if you can...

    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: Failed DBMail actually sending

    on my servers, i have a few emails that failed and still sent; i think it has a lot to do with your mail server.

    try this query out for size:

    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: Failed DBMail actually sending

    i believe the defaults for DbMail, since it's asyncronous, is to try to resend a message one extra time if it fails, but it's configurable; i once inherited a system...

    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: Global Temp Table

    if you create table in tempdb, without the # or ##, it will stick around until the server is stopped and started:

    IF OBJECT_ID('[tempdb].[dbo].[Facility]') IS NOT NULL

    DROP TABLE [tempdb].[dbo].Facility

    Create...

    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 Alt code characters

    if your table had a row number or primary key, then it could be displayed.

    does your real table have it?

    so isntead of this:

    create table #isin_code

    (

    code varchar(5),

    code_desc Nvarchar(510)

    )

    it's really this?

    create 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: How do I dynamically create the table with the current date at the end ?

    create a table with a known name, and then rename it.

    declare @newname varchar(30) = 'ACRC_427_' + CONVERT(CHAR(10), GETDATE(), 112 )

    IF object_id('stagingtmp' ) IS NOT NULL

    EXEC('DROP...

    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: sp_help_revlogin not copying sysadmin login!!!!

    Tac11 (2/12/2015)


    Thanks for the reply Lowell. just have few questions:

    1. Is it OK just to copy login using sp_help_revlogin and give 'sysadmin' role later? will it work?

    yes that will work,...

    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: sp_help_revlogin not copying sysadmin login!!!!

    that just copies logins featuring their hashed password, and not their associated roles.

    grab this version, which is enhanced to do exactly that:

    http://www.tinyint.com/index.php/2009/07/08/sp_help_revlogin-cleaned-up-and-revised-with-roles/

    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: Need some info on Actifio to replace SQL Backup Strategy

    actfio is one of those applications like the retired Redgate SQL VirtualRestore, or Ideras Virtual Database and others that allow you to load an existing backup and immediately treat it...

    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 data models of all databases

    what is a data model to you?

    there's tons of example scripts of database documentation,scripting out object definitions, basic counts and stats, how to create diagrams, etc, but "data model"...

    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 all stored procedures in a database

    certainly possible, this is one of those situations where a cursor is probably appropriate, but there's a few questions:

    what about parameters? do all your ~140 procs have no parameters/default parameters?

    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: How to kill current queries taking most cpu.

    admin 31599 (2/11/2015)


    What do you mean "get 3 envelopes"?

    http://www.design.caltech.edu/erik/Misc/Prepare_3_Envelopes.html

    A fellow had just been hired as the new CEO of a large high tech corporation. The CEO who was stepping down...

    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 - 1,996 through 2,010 (of 13,460 total)