Forum Replies Created

Viewing 15 posts - 12,436 through 12,450 (of 13,469 total)

  • RE: smart headers

    to do what yoiu are asking, you need to take the RIGHT() 15 chars of 15 '0' + the convert of your value.

    for example

    SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,GETDATE(),112) ,15)

    look at...

  • RE: Trigger not getting values from INSERTED

    anytime you SELECT something, you technically could insert it into another table.

    if you did SELECT TOP 5 NAME FROM sysobjects WHERE xtype='U', there's 5 rows right?

    if INSERT INTO SOMETABLE(TableNames)   SELECT...

  • RE: if isdate(5647) returns true, how do you determine if a value is a date

    --As Ray identified, an integer will return as a valid date, so you need to filter the results with what date ranges are acecptable for you:

    declare @someval int,

            @MinDate...

  • RE: Stored Procedures

    system stored procedures have a lot of notes in Books Online.

    all the other stored procs would be created by your developers or some other party, so it's up to...

  • RE: Trigger not getting values from INSERTED

    just a quick note: your trigger will fail if the INSERTED table has more than one row . you should change it to something like this:

    if update(entry)

      begin

        update results_ext...

  • RE: smart headers

    awesome! glad it worked out for you.

    It was a neat challenge to try and figure that one out. It's really just grabbing building blocks of code I used before, and...

  • RE: Using sp_executesql

    lol sorry for pointing out the obvious...I'll read a bit more on it and see if i find something un-obvious.

  • RE: Using sp_executesql

    Gordon that latch type 2 error made me remember that there was  a problem in early service packs....while it might not be your specific problem, what version is on your...

  • RE: smart headers

    bcp doesn't allow you to append files, but the COPY command certainly is able to do it.

    here's a complete example: it uses the function i suggested above.

    psuedocode: bcp, make header,...

  • RE: String Manipulation

    lookjs like you are assuming a specific date format and preceeding zeros that you did not mention previously:

    well this will work, but I agree with Ray that this isn't the...

  • RE: Performance of Joins Vs Functions

    I agree with Lynn no value to using a function in this case; also, I'd suggest creating an index on those 7 columns; it would most likely help on performance...

  • RE: String Manipulation

    you'll want to use the convert function most likely...

    assume a db has three int or other numeric columns:

    SELECT * from sometable

    WHERE CONVERT(VARCHAR,MAJORVERSION) + '.' + CONVERT(VARCHAR,MINORVERSION) + '.'...

  • RE: smart headers

    look at this script from the contributions, which opens a file and appends to the end of it:

    you could BCP to a file, and then use the script to append...

  • RE: Database Creation Date - Screwy Results

    interesting; other than a restore of the data, everything i tried so far left the CRDATE in master.dbo.sysdatabases intact:

    stopping/starting server. also tried rebooting the server.

    backup full database, then backup transaction...

  • RE: how do you secure SQL against everyone?

    yep use a snapshot: a developer doing SELECT * FROM THE800MILLIONROWTABLE will kill usability, and he might have done it just to remind himself of column names.

    keep developers off production.

Viewing 15 posts - 12,436 through 12,450 (of 13,469 total)