Forum Replies Created

Viewing 15 posts - 4,861 through 4,875 (of 13,460 total)

  • RE: Actual Exec plan not recommended missing index?

    I see the execution plan returns 8 columns of data and 90 rows, but had estimated 237,932;

    I see that WR_SCOPE_FITUP is actually a view of other tables; are...

    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 not create different schema table from the Database Diagrams other than dbo

    interesting Pablo;

    If i drag add existing tables that belong to a different schema, no problem;

    creating them via the diagrams interface, you can't specify the schema, i agree.

    I think you'll...

    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: Design pattern for Phone

    i see your point Chad;

    I'd consider removing the table as well;'

    for me, a phone number is an attribute of a person/location; so the attribute should stay with it's containers.

    you could...

    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: Derived column

    nested replace would probably be the easiest:;

    you could substring it as well, because the desired string, including dashes will be 36 chars.

    SELECT REPLACE(REPLACE('{784A4579-8689-438E-ADAA-9DCBC8A88AE7}','{',''),'}',''),

    SUBSTRING('{784A4579-8689-438E-ADAA-9DCBC8A88AE7}',2,36)

    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: use a variable to identify table in FROM statement

    Are all the tables the same layout/columns?

    if they were, you could create One View to Rule Them All:

    CREATE VIEW OneViewToRuleThemAll

    AS

    SELECT 'CLT123' AS ID, * FROM ClientTableCLT123 UNION ALL

    SELECT 'CLT124' AS...

    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: Right, I've had enough of poorly-written practice questions!

    well, A: cannot be correct at all: a table doesn't have collation, only the columns in a table do(and only those that happen to be varchar/char/nvarchar/nchar)

    D cannot be correct, becuase...

    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: Is it OK to ask salary range before applying?

    True story: my wife was miserable at her job; mean co-workers and the usual underpaid, overworked, underappreciated, story.

    so I told her she should start shopping around, but not settling 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: Avoid characters that viloate UTF-8 Encoding

    well, the forum inteprets the escaped values as something it should render...whoops.

    link to the function as raw text here:

    HTMLEncode.txt

    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: Avoid characters that viloate UTF-8 Encoding

    and here's a similar one i wrote long ago which converts things like © to the html entity ©

    I think it was specifically due to XML:

    CREATE FUNCTION HTMLEncode(@OriginalText VARCHAR(4000))

    RETURNS...

    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 do this? Part-2

    i've put more than a few posts on the board here on SSC, so I've helped an aweful lot of people.

    ;

    the best way to learn is to try. 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: How to do this? Part-2

    both these posts looked way to much like homework;

    I don't think the OP will learn anything if we do the work for him, without letting him learn the techniques.

    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 get the Month of a datetime stamp to show in a new column

    it depends on what you mean by "month", either the number or the name:

    there's some handy built in functions to help:

    SELECT ContId

    ,CreditL

    ,CreatedOn,

    MONTH(CreatedOn) As MonthNumber,

    DATENAME(month,CreatedOn) As MonthName

    ...

    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: sysmail service stops every 5 seconds

    i would swear i've seen this; i think it has to do with the account that is starting the service having the password/expired/changed.

    i'm not having luck finding it in my...

    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: table sizes for all d/b on the server

    did you create the proc on this server, and put it in the master database?

    remember you also had to mark it as a system procedure with EXECUTE sp_ms_marksystemobject 'sp_spaceused2'

    like i...

    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: table sizes for all d/b on the server

    the USE <dbname> and the EXEC sp_....have to be in the same EXEC statment....otherwise the fiirst one, just use <dbname> goes out of scope when the the eXEC finishes (instantly)

    declare...

    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 - 4,861 through 4,875 (of 13,460 total)