Forum Replies Created

Viewing 15 posts - 9,751 through 9,765 (of 13,469 total)

  • RE: Insert Footer for a Word Doc from T-SQL

    i just tested it, and it would not work; created a word doc with "[header]" in the header,"[footer]" in the footer, and "[body]" in the main document;

    saved it and...

  • RE: Insert Footer for a Word Doc from T-SQL

    if your template has a keyword you could search for, like a token of "[footer]" that you could search for and find/replace as a raw text string, that might be...

  • RE: No More NULL

    All right! things are going to be so much easier now!

    so when i define a table, i can decide to use my own default ie, "1" for the default value,...

  • RE: Bulk insert issue

    because the data is quote delimited, you'll need to use a format file, i think; BOL or a google search will be your best bet to help you research and...

  • RE: Delete / Replace Blobs

    you definitely should follow Jeff's advice and add a datetime column to the table; it'll save you a lot of toruble, and is harmless:

    ALTER TABLE [tblCustomerImages] ADD [CreatedDate] DATETIME DEFAULT...

  • RE: Foreign key constraints...WHY??

    I'd also note that Referential Integrity is a best practice; be sure to read all the articles on Best Practices /Worst Practices here on SSC to get a good flavor...

  • RE: How to query out duplicate rows (without deleting)

    basically, you'd replace #EXAMPLE with the query(in parenthesis) you were going to use; without all the CREATE TABLE info, there;s nothing i could test based on the sql you posted;...

  • RE: How to query out duplicate rows (without deleting)

    it looks like you want to get duplicate rows, but ignore the Title, right? I'd probably not partition on the date, either, but look at this and see if it...

  • RE: Intermitent Primary key violation in Nightly jobs

    Alex i think i can see a couple of issues here.

    I'm not trying to bash you, just hoping to help you make your process better.

    first, it's clear that you are...

  • RE: How to order by

    maybe something like this?

    Ex if coolumn ALPA as B,C,D,E,R,T ,Z then i have to display according to report

    Coloumn ALPA as z ,E,B,R,C,T

    ORDER BY

    CASE

    WHEN ALPA IN...

  • RE: Passing Variable in SQL script

    there's two ways to do it Paul; the best way is to parameterize the integers:

    declare @extract varchar(10),@Start int,@length int

    set @Start =2,@length =4

    select SUBSTRING('Hello Paul', @Start ,@length )

    to do it the...

  • RE: Insert Footer for a Word Doc from T-SQL

    you'd need to use Word Automation, where you open the word document programatically, change the header and footer, and save it.

    TSQL is the wrong tool for that, like cutting boards...

  • RE: Anyone know how to obtain the SQL code which caused a trigger to fire?

    i've tried two methoids so far to get the current/last issued? command from inside the trigger: in the above example. both get the same info, just from two different ways....but...

  • RE: Anyone know how to obtain the SQL code which caused a trigger to fire?

    it is certainly possible; all i can do is give you a generic working example for you to use as a model.

    in this case, the important piece is the inserting...

  • RE: Counting results

    SELECT

    SUM(CASE WHEN answer=1 THEN 1 ELSE 0 END) As YES_Answers,

    SUM(CASE WHEN answer=0 THEN 1 ELSE 0 END) As NO_Answers,

    FROM answers

    WHERE questionaire_id = @id

Viewing 15 posts - 9,751 through 9,765 (of 13,469 total)