Forum Replies Created

Viewing 15 posts - 8,671 through 8,685 (of 13,469 total)

  • 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...

  • 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;...

  • 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...

  • 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...

  • 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?

  • 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

    ...

  • 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...

  • 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...

  • 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...

  • RE: I want to capture the data in a field ipto last comma.

    you'll want to use a combination of tw REVERSE commands,SUBSTRING and a CHARINDEX to get at what you want;

    this kind of breaks it down into understandable pieces(i hope)

    with myExampleCTE as

    (SELECT...

  • RE: Execute Process Task & PKUnzip.exe

    gotcha...your agency already had pkzip/pkunzip; I has assumed (you know the rule on THAT) that you bought that product as new.

  • RE: Scalar valued function compatibility issue.

    SQL Server version 7.0 doesn't support CREATE FUNCTION,

    user-defined functions were introduced in MSSQL 2000. In 7.0, you still

    have to use stored procedures.

  • RE: IF EXISTS T-SQL (Caution: Newbie)

    you are really close...your problem is that you can't just refer to a column of data..it has to come from a select statement.

    so you are testing if the serial number...

  • RE: Execute Process Task & PKUnzip.exe

    Brandie I'm really surprised you have not gone with 7zip, after all the trouble you've been having, and the recommendations from other posters.

    I used to use commandline pkzip when it...

  • RE: SCHEMABINDING question

    actually, what happens is the alter table statement fails:

    here's a simple example:

    create table Example(exid int identity(1,1) not null primary key,

    exampletext varchar(30) )

    GO

    create view vw_example

    with schemabinding as

    select exid,exampletext from dbo.Example

    alter...

Viewing 15 posts - 8,671 through 8,685 (of 13,469 total)