Forum Replies Created

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

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

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

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

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

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

    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: 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

    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: Drop all connections

    ok just to be sure, you did uncomment this line like i said you needed to,right?

    --EXEC SP_EXECUTESQL @STR

    i didn't want other readers running that 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!

  • RE: Delete / Replace Blobs

    jtetler (3/31/2010)


    What I actually need is sample code on how to either delete the selected rows or preferably how to delete the images in those rows.

    Thanks,

    Jim

    here's some code; i...

    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: Trying to JOIN

    Norm this is just a guess based on adapting your posted query;

    does this get you close to what you were after?

    SELECT

    c.ClassName,

    c.EnrollLimit,

    p.RegType,

    p.RegStatus,

    ...

    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: Identifying System Generated Constraint Names

    because the underscore has a special meaning in a LIKE statement, i think you need to do something like this instead to find two underscores back to back:

    where ...

    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: Profiler Setting !!!!

    Bhuvnesh first, create a server side trace; it's actually a very low impact on the server, but can provide you with exactly what you are looking for, as well 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!

  • RE: Encrypting the entire database.

    dang; i followed the fine article cos_ta393 posted; at the very end, i found out only enterprise or developer supports TDE; my 2008 Standard doesn't support that feature.

    That's something to...

    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: SSMS Server Registration Issue

    the devil is in the details: what does "resolve remote server name" mean;

    if it's over the internet, is there a DNS of YourRemoteSQLServer.SomeDomainName.Com, or are you talking about a machine...

    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: query

    this is syntactically incorrect, whether a select or an update....paste it in SSMS and see for your self.

    Sasidhar Pulivarthi (3/30/2010)


    if U want to use if statement in the 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: query

    not enough info, khushbu ; the pseudo code you posted....is that an UPDATE? a SELECT? what is the question?

    it almost looks like an attempt at an UPDATE to me, but...

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