Forum Replies Created

Viewing 15 posts - 12,811 through 12,825 (of 13,460 total)

  • RE: Difference between Script and View

    minor differences: a VIEW is a saved SELECT statement(script), but it has some additional constraints, like all column names in the SELECT must be unique (can't do SELECT ID,ID,* 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: crystal report 8 report designer count(field) issues

    i think Crystal requires all fields to have a name/alias, right? try this:

    SELECT DISTINCT count (accts) AS ACCTCOUNT FROM SOMETABLE WHERE Base like '%bus%'

    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: Delete using join

    all that is missing is your WHERE statement after the join, so the SQL knows what to exclude/include in the delete:

    delete

    from @a

    left outer join @b-2 as b

    on a.col1 =...

    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: User without connect permission somehow have fullaccess to a user database!

    you might also want get the user to connect, and use sp_who or sp_who2 adn see what username they connected with... that might help track down what login they use...

    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: User without connect permission somehow have fullaccess to a user database!

    [Builtin\Administrators] would have the same rights as the sa user.....anyone in that group gets mapped to the dbo database owner, so it wouldn't be obvious that they have permissions, since...

    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: Quickest way to clear all tables

    this might help: it created either the appropriate DELETE or TRUNCATE statement, and created them in Foreign key hierarchy order.

    you'd want to enahcne this so that it doesn't delete 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: list User Stored Procedures that reference a specified table

     

    ive used this in the past; it's a cursor, and resource intensive; it takes a couple of minutes to run on my 100meg database with 100's of procs 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: Using count(*) more than once?

    soemthing like this is probably what you want: you want to use a case statement to determine how a row gets counted

    SELECT SUM(CASE WHEN DUES > 0 THEN 1 ELSE 0...

    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_executesql with Dynamic SQL string exceeding 4000

    the EXEC command has no limitation to the length of the command, so you can append variables to death with it..., but sp_executesql has a parameter that has a limit.

    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: Log file for simple recovery db is 30GB

    you can see a lot of log bloat if you have scheduled jobs that are doing things like DBCC Reindex or other similar maintenance operations. could that be what 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: which proc use table a?

    ive used this in the past; it's a cursor, and resource intensive; it takes a couple of minutes to run on my 100meg database with 100's of procs and 1400+tables:

    sample...

    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: German speakers: Englischprobleme mit Softwarefirmen oder ist Englisch kein Problem?

    translated via Google: basically fill out my survey and maybe win an Ipod:

    I examine straight which software experts in the German-speaking countries for problems with English software 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: xp_cmdshell & PSEXEC -- "The process tried to write to a nonexistent pipe."

    also psexec is a command line program from sysinternals.com...is that installed in the path on the server?

    just one more thing to double 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: Is there a URL Decode function?

    take a look at this thread from a couple of years ago...someone adapted the hex scripts to do this:

    I see that that takes care of %20 kind of stuff 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: Adding field, time goes from .5 to 12.5

    for both SQL's, you'll want to view the estimated execution plans. they will be different, becuase the second sql is returning data from the other table

    Is there an index on...

    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 - 12,811 through 12,825 (of 13,460 total)