Forum Replies Created

Viewing 15 posts - 6,751 through 6,765 (of 13,460 total)

  • RE: Adding db users to multiple db

    use the metadata to help generate teh required commands;

    i think something like this can help:

    SELECT

    'USE '

    + name

    + '; IF NOT EXISTS (SELECT * FROM '

    + name...

    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' statement in Stored procedure...

    is there some sort of logic which can be used to decide whether the grading tables belong or not, or is it a conscience decision by someone after the database...

    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 rollover data from zipcode to state level?

    that's just a basic Group by with the summing of columns, i think:

    SELECT

    State,

    SUM(val1) AS val1,

    SUM(val2) AS val2,

    SUM(val3) AS val3,

    SUM(val4) 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: Capturing Stored Procedures statements with DMVs

    ahh nice Gail, you are right!

    i ran it three more times after your post, and only when it recompiled with the first parameter i threw at it showed up in...

    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: Capturing Stored Procedures statements with DMVs

    Based on what Jason pointed to, where you can harvest info from the execution plans, this seemed to work for me;

    i ran a proc "sp_find that takes one parameter...it's basic,...

    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 can we Upload files to SFTP server using SQLSERVER 2005 Stored procedures.

    "The filename, directory name, or volume label syntax is incorrect."

    that says the user running the procedure via xp_cmsshell does not have permissions to get to the file you want to...

    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: Query

    WHERE CHARINDEX(' ',ColumnName) > 0 is one way.

    WHERE ColumnName LIKE '% %' is another;

    you can also count the number of spaces and use that as criteria:

    WHERE DATALENGTH(ColumnName ) - DATALENGTH(REPLACE(ColumnName,'...

    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 can we Upload files to SFTP server using SQLSERVER 2005 Stored procedures.

    any recent version, including the latest version2.2. they all support command line for version 2.0 and above, and maybe earlier verisons.

    here's the command line syntax doc:

    http://www.coreftp.com/docs/web1/Command_Line_FTP.htm

    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: Query on Check constraints

    hunt (9/19/2011)


    I hope there is a confusion with my question.

    I am not asking why my insert was falied ...am asking why SQL server accepts such a conflicting range of...

    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: DB mail - Table in HTML Body - Adjust Font size

    text to columns? do you mean that is 'rows to columns", or also known as a pivot or unpivot query?

    the pseudocode you've got so far is not really enough 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: strings, substring, patterns (or lack of them)

    ColdCoffee you are right of course, but at least the function would be available for the duration of the migration/parsing she was doing;

    i kind of assumed she was splitting data...

    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: strings, substring, patterns (or lack of them)

    happiestgirl (9/16/2011)


    Thanks so much. I'll probably go with the split idea. I think this is going to be fun incorporating this into one query (can't create functions). 🙂

    be sneaky and...

    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: strings, substring, patterns (or lack of them)

    i've got a couple of suggestions for you;

    here's a function CHARINDEX2, which allows you to find the nth occurrance of a string within-a-string:

    /*

    Example:

    SELECT dbo.CHARINDEX2('a', 'abbabba', 3)

    returns the location of 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: DB mail - Table in HTML Body - Adjust Font size

    did my example work for 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: Query Help! Combine two queries.

    here's my best guess featuring a left outer join, but it seems wierd for my inner query alaised as MYTOTALS: i'm getting the accoutn number, and the distinct count...not sure...

    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 - 6,751 through 6,765 (of 13,460 total)