Forum Replies Created

Viewing 15 posts - 8,911 through 8,925 (of 13,460 total)

  • RE: check position of value in string.

    this thread is a follow up to ny66's need to parse a substring into seperate fields:

    http://www.sqlservercentral.com/Forums/FindPost967451.aspx

    in that post, I had assumed the data was single-space delimited, based on the example...

    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: Correlated MAX query in where clause, when there are more than one max value

    steve i think all you need to do is instead of getting the max(probability), you just createa a subquery with a group by construc, and join to that;

    based on your...

    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

    ny66 (8/17/2010)


    if i use replace, i still cant get the values in the columns i need due to length of the field. there is no set length on the first...

    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 Execution Order with multiple Joins

    i think your developers are right, and that the order of joins has no meaning; as I understand it, no matter the order of the joins, the Query Engine will...

    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: copying 1 table with indexes to another same server

    OK i'm not sure why you cannot use the existing GUI tools in SSMS to script the table, including the index definitions; in 2008 you can also get the GUI...

    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: Deny creation of sysadmin users via Stored Procedures

    I believe the procedure will fail, because only an existing sysadmin can create another sysadmin.

    so even though your UserA is db_owner in his database,

    as long as his personal logon is...

    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 tell difference betwwen empty string and one or more blanks

    sgambale (8/17/2010)


    Thanks for the replies. It makes sense that 1, 2, or 3 blanks is treated the same (with the entire column filled with blanks), but the empty string...

    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: Error in Generating scripts

    if you used the GUI, you can rename a stored procedure without having changed it's underlying definition. that was at least true in SQL 2000 with Enterpise Manager.

    so i 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: DENY DROP TO DB_DDLADMIN

    balasach82 (8/17/2010)


    Its ok if the user can delete his own tables, But other than the using trigger is there no way to stop the user from dropping other's tables?

    that is...

    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 tell difference betwwen empty string and one or more blanks

    the LEN() function ignores trailing spaces, even on a CHAR data type, where the DATALENGTH() function respects the spaces;

    so to find exactly two trailing spaces in a column:

    SELECT * FROM...

    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: DENY DROP TO DB_DDLADMIN

    balasach82 (8/17/2010)


    How Deny DROP access to a db_ddbladmin user. The user needs to create tables/views/sp's etc

    you cannot modify the built in roles in any way;

    what you want to do is...

    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: INSERTED Table for Update Trigger

    ok i'm pretty sure you are pasting untested code, because the tables you pasted do not have the same column names as the trigger;

    i'm not surprised nothing seems to work...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: INSERTED Table for Update Trigger

    well, the way i read your trigger, it should be working just fine.

    if you run this commnad, do you see changes in the status?

    SELECT i.AppointmentUID,i.AppointmentStatusUID,StatusStartTime

    FROM AppointmentStatusTransactions

    GROUP BY i.AppointmentUID,i.AppointmentStatusUID,StatusStartTime

    ...

    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: INSERTED Table for Update Trigger

    the UPDATE() function is so misleading.

    the UPDATE() tests to see if the column name was specifically included/named in the update or not...it does not test if a value changed.

    what...

    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: Data type I don't understand (COMMENT(int),null)

    ok, now it sounds like they added a custom data type; no big deal, but a bit harder to figure out.

    In SQL, you can declare your own datatype, and decide...

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