Forum Replies Created

Viewing 15 posts - 6,556 through 6,570 (of 13,469 total)

  • RE: Only integers

    Amy.G (10/14/2011)


    Ah, the CAST vs. CONVERT debate finally gets personal. Well played, Lowell. 😀

    lol, so now it's time for my obligatory reply:

    "CAST?!?! you used CAST?!! you're doing it wrong!" 😀

  • RE: Inserting with a view

    you'll need to create an INSTEAD OF TRIGGER on the view.

    then the trigger body can use a cosntant, or lookup from another table, or your logic of reusing a passed...

  • RE: Only integers

    if you convert to say, decimal(5,0) in your calcualtions, would that work for you ?

    /*

    ThePCTFiveOhFiveTwo

    98.9348009998.93

    99.0012009999.00

    99.0441009999.04

    99.0968009999.10

    99.1289009999.13

    99.1865009999.19

    99.2536009999.25

    99.2756009999.28

    99.3197009999.32

    99.3645009999.36

    99.4291009999.43

    */

    With MySampleData

    AS (

    SELECT '98.934800' AS ThePCT UNION ALL

    SELECT '99.001200' UNION ALL

    SELECT '99.044100' UNION ALL

    SELECT '99.096800' UNION...

  • RE: Can I trigger an SQL 2000 job or a Stored Procedure via email?

    Freeman-674288 (10/14/2011)


    Sounds like a good option, though I don't see exactly how the web app will be able to validate the GUID I send by email from SQL Server to...

  • RE: Can I trigger an SQL 2000 job or a Stored Procedure via email?

    how about a different line of attack:

    have the email send a link to a specific web page that requres the specific key (ie a GUID) that comes from the email.

    http://www.yourCompanyWebsite/SecretStuff/Quickfix.aspx?accesskey=C7EC1335-6AD6-49EB-A5CE-B45DF43EF622

    the...

  • RE: Moving a db to different Windows versions

    the structure does not have to match. that's a "nice to have" thing, but not a requirement.

    when you restore, you'll use the WITH MOVE to tell the restore the...

  • RE: SQL code

    it might be that the second column in the join (being set to a constant) is not correct;

    maybe this?

    SELECT table1.column4,

    table2.column5

    FROM table1

    ...

  • RE: SQL code

    the (+) syntax was used to show how to do a LEFT OUTER JOIN.

    both Oracle 10+ and SQL can use the newer more understandable syntax like this, so you can...

  • RE: Retrieve the Message part of a stored proc?

    the Connection Object in ADODB that you create has an Errors collection, which includes the print statements, "rows affected" as well as anytime you called RAISERROR i believe.

    print...

  • RE: SQL Script

    DO NOT USE THIS ON PRODUCTION.

    it builds a TABLE SCAN for every table which happens to contain a varchar/char/nvarchar/nchar type column.

    a millionBillionRow table could cause this to gobble up some...

  • RE: Finding the column containing the minimum value

    i'm an ID-TEN-T;

    i looked at jsu tthe execution plan for the setup table variable...of course they are the same...once i scrolled down, i saw differences.

  • RE: Finding the column containing the minimum value

    maybe it's just me, but both my solution and Chris's seem to produce the exact same execution plan?, but Chris's is 48% relative to the batch where mine was...

  • RE: Finding the column containing the minimum value

    Phil the only way i could see it was to use a case statement that evaluates each column;

    this works, but i don't know how it will perform on large data...

  • RE: Moving a db to different Windows versions

    you'll want to export your logins from the old box to the new one. the procedure sp_help_revlogin from Microsoft will do that for you .

    run it on the old server,...

  • RE: Allowing 1 login to login only once and deny other login attempts

    Mo' (10/14/2011)


    Thanks dude...

    I did not realize that ORIGINAL_LOGIN() was the user calling for authentication...

    I understand all the code.. with the exception for the last 3 lines..

    ENABLE TRIGGER...

Viewing 15 posts - 6,556 through 6,570 (of 13,469 total)