Forum Replies Created

Viewing 15 posts - 8,656 through 8,670 (of 13,460 total)

  • RE: From SP to Excel

    there's a great article on SimpleTalk on the subject.

    it's got examples of doing it two ways, via opendatasource and also Excel Automation via sp_OACreate and stuff;

    this article is doing it...

    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 store procedure sp_send_dbmail to send out a SECURE e-mail?

    man this is really interesting, but the rabbit hole is getting deeper and deeper.

    if you send an email via sp_send_mail with SECURE in the subject, does your Exchange Server encrypt...

    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 Convert Oracle Database to SQL Server Database

    Micrsofot has a couple of Migration Assistant tools to help you migrate Oracle to SQL Server (and another one for MYSQL to SQL Server)

    http://www.microsoft.com/sqlserver/2005/en/us/migration-oracle.aspx

    another alternative, if it is just a...

    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: Replace Function. Replace comma and all value after comma with Nothing

    the critical part is adding the WHERE statement...some of your data does not contain a comma...

    you want to exclude those items

    --items with the offending command and extra data

    SELECT LEFT(NAME,CHARINDEX(',',NAME)-1 )

    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: Replace Function. Replace comma and all value after comma with Nothing

    here's an example of what Wayne refered to:

    With MySampleData as

    (

    SELECT 'Support Centres , Miscellaneous SC' As TheName UNION ALL

    SELECT 'Support Centres , Care of tracey Whitehall' UNION ALL

    SELECT 'Support Centres...

    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: Changing formula for a computed column

    i believe the calculated column has to be dropped and recreated as a new calculated column.

    i just tried this as a proof of concept, and I get a syntax error...

    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 TRIGGER.. HOW TO STORE WHERE CONDITION

    you might not be able to do this in the trigger; you can get only the first 256 characters of the entire commnad...so a long command would get truncated 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: How to use store procedure sp_send_dbmail to send out a SECURE e-mail?

    Adiga (9/28/2010)


    You may use the @sensitivity parameter. Please refer this for more information.

    I think that parameters just adds a little used flag to the headers stating the "sensitivity", like confidential;...

    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: Other Formats for DATE Function

    --Midnight for the Current Day

    select DATEADD(dd, DATEDIFF(dd,0,getdate()), 0)

    I commend you for wanting to stay within the same datatype and not converting to a varchar.

    this is one of the coolest things...

    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: Querying For A List Columns In All Tables

    one of the companion views is sys.columns; so you can join sys.tables (for jsut tables) or sys.objects if you want views and tables:

    select

    tab.name as TableName,

    col.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: sp_addextendedproperty for Instances

    well, the proc writes to a database, so i guess if you added your extended property info to the master database, you could assume it's for the server, 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: Time duration in mm:ss

    i think it's just a combination of integer division and modulus:

    /*--results

    MinutesSeconds

    2571

    210

    */

    --example where value is an integer of seconds

    ...

    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: Get DDL for any SQL 2005 table

    thank you very much for the feedback and correction;

    at one point the original script was pointing at the old compatibility tables like syscolumns; that badly named column is a legacy...

    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: IF EXISTS T-SQL (Caution: Newbie)

    Doc what you want to do is the insert as a single SET based operation, which might insert 5K's worth of records, all in one fell swoop;

    It's actually easy, it'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: Distinct help

    usually you'll find the ROW_NUMBER function will do the trick for you here;

    uncomment out the outer SELECT to limit it to just one row, i left the full results 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!

Viewing 15 posts - 8,656 through 8,670 (of 13,460 total)