Forum Replies Created

Viewing 15 posts - 4,996 through 5,010 (of 5,393 total)

  • RE: INSERT with computed column

    OK, so I suppose this doesn't look strange to anyone but me.

    Thanks for your answers, bc

    -- Gianluca Sartori

  • RE: Select integer ranges

    Try this:

    Right Join it to a tally table and then remove groups for NULLs in an outer query.

    -- Gianluca Sartori

  • RE: INSERT with computed column

    Once again this is obvious...

    I'm sorry, maybe I'm not able to pose my question clearly enough:

    1) Why don't insert statements fail even if I try to insert 3 values in...

    -- Gianluca Sartori

  • RE: INSERT with computed column

    Yes, this is obvious.

    What's less obvious is why no error is raised when insert list contains more items than the select list.

    I would have expected any insert to fail...

    -- Gianluca Sartori

  • RE: Select integer ranges

    I see that your groups are repeating with different ranges, so I guess you need groups of all consecutive values with MIN and MAX, right?

    Can you post the query you...

    -- Gianluca Sartori

  • RE: Unable to Connect to error.

    You should have a line in your script such as:

    Set someVariableName = createObject("ADODB.Connection")

    That "someVariableName" is your connection object.

    At some point in the script you should have something like:

    someVariableName.connectionString = "yourconnectionString"

    Can...

    -- Gianluca Sartori

  • RE: Unable to Connect to error.

    I would start investigating from the basics: does the server respond to connection attempts?

    Try using a tool such as OSQL.EXE to test connectivity from the client machine you are running...

    -- Gianluca Sartori

  • RE: Linked Server // Query doesnt use Index

    simon.ciglia (7/21/2009)


    any workarround (but please dont say "openquery" ;-))

    What about EXEC AT? 🙂

    -- Gianluca Sartori

  • RE: How can we create the procedure using AVG and sum functions

    It's hard to answer this question without some more information.

    You should provide DDL script for tables and some sample data.

    I suggest you take a look at this article

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    and come back...

    -- Gianluca Sartori

  • RE: How to get update source t-sql statement inside a trigger

    You can use something like this:

    DECLARE @SQLBuffer nvarchar(4000)

    DECLARE @buffer TABLE (

    EventType nvarchar(30),

    Parameters int,

    EventInfo nvarchar(4000)

    )

    INSERT @buffer

    EXEC sp_executesql N'DBCC INPUTBUFFER(@@spid) WITH NO_INFOMSGS'

    SELECT @SQLBuffer = EventInfo

    FROM @buffer

    Hope this helps

    Gianluca

    -- Gianluca Sartori

  • RE: Linked Server // Query doesnt use Index

    To get a better control on how query is executed on the remote server, I suggest you use OPENQUERY instead of the four-part name syntax. What you put in the...

    -- Gianluca Sartori

  • RE: Data getting deleted automatically

    I suggest you put a trigger for delete and capture as much information as possibile on the delete command and put the results in an auditing table.

    Just a hint to...

    -- Gianluca Sartori

  • RE: SQL View

    frecal (7/20/2009)


    can i do a view that displays

    id, surname, relatedto, relationtype, relatedto,relationtype, etc depending on how many there are

    You can't do it with a view: it must have a fixed...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    I received all email notifications during the weekend, but there's been very few posts.

    I don't think this means something like "Are the posted questions getting BETTER?"

    Should I start a new...

    -- Gianluca Sartori

  • RE: Returning a value from dynamic SQL?!

    Looks like you declare @sql of type varchar rather than nvarchar.

    Didn't you?

    Hope this helps

    Gianluca

    -- Gianluca Sartori

Viewing 15 posts - 4,996 through 5,010 (of 5,393 total)