Forum Replies Created

Viewing 15 posts - 8,311 through 8,325 (of 13,460 total)

  • RE: Assigning result of Select

    avoid using varchar(max) unless you need it...since you are doing substrings, you know you can use something smaller.

    if there is more than one row in the table, you cannot guarantee...

    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: Performance where <> in <> inner join

    i believe the IN statements can bail out as soon as a single value is found in V_LOAD_COMBINATION ;

    when you join the tables, the join would perform better if there...

    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 utilize Lookup tables without hard-coding business rules in SQL Statements

    still digesting the question, but i took the time to apply a macro on your sample data for anyone who needs it:

    SELECT '1' AS ID,'1' AS Priority,'1' AS Active,'Small Storage'...

    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: Get new Identity Value Insert into another table

    As Gsquared implied, it is perfectly normal to encounter a situation where you have to insert both Parent and then Child information into two different tables...since this is the whole...

    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: Can SQL Server accept / refuse a connection by IP?

    here's a prototype to start testing with; i don't know what happens when people connect with named pipes; i assume the ip address is null, but you'll want to check...

    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 create a trigger when a data value changes to a stringsubset.

    i think the problem is when you are comparing @email. it is looking for an exact match...no wildcards.

    i think it should be this:

    IF @Email LIKE '%@xxxyx'

    are you REALLy testing for...

    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: Can SQL Server accept / refuse a connection by IP?

    the windows firewall is the best place to do the blocking; it's also possible that you could create a logon trigger and block by Ip/hostname inside that trigger, if you...

    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 View from Trigger Hangs

    I've done something exactly like this...based on the rows in a table, a view with dynamic pivots gets altered.

    in my case, i write to an events table from within 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: Oracle 11g Linked Server OLE DB Data Type Error

    chris.thornburg (12/7/2010)


    Okay in your scipt when you say ALias do you mean my TNSNAMES server alias or the name of my Linked server?

    The Alais is just what the linked server...

    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: Oracle 11g Linked Server OLE DB Data Type Error

    i seem to remember that the msdbora driver was valid only up to oracle version 9; with 10 and above, the blob type fields cause issues.

    if your select statement did...

    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: Can I use the same alias for different tables within one store procedure?

    the rule of thumb is each object in a statement must be uniquely identifyable, whether by object name or by alias;

    in your example, each sql is standalone and following 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: Store Procedure inside the Package is running slow

    well first lets get rid of the cursor.

    there is nothing a cursor does that a set based operation cannot do, and the set based would be a couple of orders...

    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: Store Procedure inside the Package is running slow

    statistics most like is the culprit.

    if your SSIS package is insertint/deleting/updating rows, and then calling the procedure, the statistics are probably very different than when the stored procedure was created.

    update...

    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 index in table variable

    there was a thread alst week on how performance can be poor when you try to drop a temp table , where you created a temp table, and then...

    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: COALESCE returns 8 blank spaces?

    cvandevoorde (12/6/2010)


    Huh... The 2 columns I noticed the problem with, the PREFIX and SUFFIX, are char(8). The others are varchar.

    I still don't understand why, if the columns...

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