Forum Replies Created

Viewing 15 posts - 9,106 through 9,120 (of 13,460 total)

  • RE: Using REPLACE on non-display characters

    the brackets INSIDE the quotes means you are looking for the brackets also...that's not what you want.

    try this instead:

    update address_table

    set addr_line_1 = replace(addr_line_1, char(9), ',')

    where CHARINDEX(char(9),addr_line_1 ) > 0 --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: Prevent Truncates via Trigger

    "resetting" their permissions is not a big deal...fairly easyactually, but it's seems iuntimidating if you have not done it before.

    say you need a role where they can read/write and also...

    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 data to QIF file?

    Wiki has a good explanation of the format:

    http://en.wikipedia.org/wiki/Quicken_Interchange_Format

    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 data to QIF file?

    Well looking at the format of the QIF file, it's not difficult, but it's not easy either.

    I've done it the other way...using a utility that converts QIF to comma delimited,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: Getting the field names and definitions from a stored procedure in c#

    you could use the OPENROWSET command to run the proc and insert its resulting data into a table on the fly.

    then you can drag the table into a typed dataset...

    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 Table - Find who altered it and when

    whodunnit info is contained in the Default Trace, which keeps only a brief history of all DDL changes(CREATE/ALTER/DROP...not SELECT UPDATE DELETE, which is DML statements.

    only a limited amount of 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: Combining SELECT query, JOIN table with SUBSTRING

    ugg...i've inherited a couple of situations like this, where a field needs a Decoder Ring to parse out the secret values contained in the field...it's a pain since it doesn't...

    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: please help with query

    what you want to do is create a VIEW that gathers this information on demand, instead of trying to update a static table with the calculations

    try this working snippet:

    CREATE TABLE...

    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: output of SQL query in mail format

    the key is two parts: including a @query parameter = 1, and making sure the @attach_query_result_as_file = 0;

    the only issue is if you wanted it formatted as each value being...

    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: select top 3 records of each type baesd on type id

    i believe it is because of the correlated subquery, where the inner query getting the TOP 2 is connecting to the outer query:

    ...

    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: select top 3 records of each type baesd on type id

    mrpolecat, with windows 2005 and up, you could easily use the row_number() function to get what you are after; you probably knoew that already.

    For SQL 2000 it's not so intuitive.

    Here's...

    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: Multiple questions about Database Mail

    well in my case, I might be sending hxkresl@gmail.com,lowell@yahoo.com and jason.stephens @bing.com all the same email....

    all those emails are going to be in a table with all my contacts, right?...

    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: Parsing T-SQL

    it's been a couple of years since this post was active; glad you found it.

    since then, i put together a script to check for invalid objects; read this article, grab...

    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 use a function in a query?

    I had wondered why the table had those values...it didn't make any sense to me before, either...loked ugly in the results.

    the issue:

    the value in the field is a string which...

    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: Multiple questions about Database Mail

    in my case, each of my profiles mirror the email accout they are going to send from...

    without pushing my own sites on you poor saps,

    i'd create one named "sqlservercentral"...

    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 - 9,106 through 9,120 (of 13,460 total)