Forum Replies Created

Viewing 15 posts - 4,831 through 4,845 (of 13,465 total)

  • RE: Select table names from queries

    I love the peer review here; i didn't think of spaces in table names at all...

    makes me think it's better to grab the execution plans instead, and parse the XML,...

  • RE: Decimal Hours Duration to HH:MM

    Here's my first guess at it; i left lots of stuff in there to look at to help understand it.

    With PayRollHours (TheTime)

    As

    (

    SELECT 1.5 UNION ALL

    SELECT 30.75 UNION ALL

    SELECT 40.00 UNION...

  • RE: Select table names from queries

    Eugene Elutin (8/30/2012)


    Lowell (8/30/2012)


    you could search for words that exist after "FROM" and "JOIN", right? ...

    What about: INSERT, INTO, DELETE, TABLE (in possible truncate, create, alter or drop table statements).

    good...

  • RE: Select table names from queries

    i get very few false positives when i go after my procedure and function definitions using that technique:

    SELECT definition,T1.*,T2.* from sys.sql_modules

    CROSS APPLY dbo.DelimitedSplit8K(definition,' ') T1

    CROSS APPLY dbo.DelimitedSplit8K(definition,' ') T2

    WHERE...

  • RE: Select table names from queries

    you could search for words that exist after "FROM" and "JOIN", right? and that should get the tables, regardless of the prefix?

    I'm playing wiht a splitting with a delimited...

  • RE: Querying EAV data

    can you post some more details? the DDL for the table, a couple of sample rows, and an example of what you have to change wehn you add a new...

  • RE: its ages since i wrote a trigger

    Eric i see just a couple of things i'd change.

    the IF UPDATE(Canc) is misleading...it doesn't test if the column changed...it tests if the column was referenced in the update;

    some...

  • RE: How to write Transpose in Oracle Please Help

    if you google "Oracle UNPIVOT", you should get some examples of this "transpose" thing you are looking for.

  • RE: SQL Execute Reader Error

    that one is a snippet from a specific report that gets sent as a raw text;

    it's being padded so that in courior font it uses lines up in pretty...

  • RE: SQL Execute Reader Error

    SQLdr.Read would move the pointer to the next row; my code is very similar to yours, so i think RBarryYoung is right...it seems like you have a boatload of rows?

    ...

  • RE: Certificate-Signed Stored Procedure: CREATE PROC script doesn't include this

    pretty sure your going to hit the wall trying to script the password;

    ADD SIGNATURE TO OBJECT::[TestSendMail]

    BY CERTIFICATE [DBMailCertificate]

    WITH PASSWORD = '$tr0ngp@$$w0rd';

    i was playing around and came up with this,...

  • RE: Adding Seconds to Time field

    As Lynn was asking, it's a real TIME datatype, you can add values via dateadd.

    /*

    (No column name)(No column name)

    16:40:27.000000016:52:41.0000000

    */

    declare @time time

    SET @time = '16:40:27'

    SELECT @time,DATEADD(ss,734,@time)

  • RE: Stored procedure in a function

    Are you sure about that?

    copy and paste it to SSMS...that stops right away with a syntax check, since the EXEC command cannot exist inside the parameter list.

    H4K (8/29/2012)


    You...

  • RE: How to edit User Defined Type's column datatype

    I just tested this: you must drop all the objects that use the type, drop and recreate teh type, and then create all the objects that used to use it...

  • RE: Can't Restore DB Because of Active Connections

    you want to make sure that YOU are in the database, so that when it is set to single user, YOU are the single user. otherwise, like if you rant...

Viewing 15 posts - 4,831 through 4,845 (of 13,465 total)