Forum Replies Created

Viewing 15 posts - 91 through 105 (of 192 total)

  • RE: column exists problem

    Sorry, I misread your post. One option is to use dymanic SQL for your update. That way it doesn't fail at parsetime. We'll try to think of a better alternative....

  • RE: column exists problem

    Try this query and let us know the results:

    select * from information_schema.columns where table_name = 'CAMPAIGNS' and column_name = 'Deadline'

    Generally, you want to use the information_schema views (as MS wants...

  • RE: Dynamic Fieldnames for View or Table

    This is a bit of a hack, but you could try this:

    --Create example table structure
    CREATE TABLE #tableA
    (
        ID          INT     PRIMARY KEY CLUSTERED,
        CustName    VARCHAR(50),
        Address     VARCHAR(200),
        Telephone    
  • RE: Dynamic Fieldnames for View or Table

    I think I understand what you are asking:

    Will you be using this solution to retrive info for only one ID value at a time? If you are using it...

  • RE: Friend someone know execute a sp with parameters in excell but that excell asks them??

    I developed a simple excel spreadsheet that I use for UNIT testing that would be a good demonstration how to implement sp calls in VB.

    Basically there are three sheets,...

  • RE: Stored procedure / case

    I like Joel's solution, it's compact and elegant ( and easy to maintain, the code is only in one place) and there isn't really going to hurt updating several columns...

  • RE: help

    Do you expect the format of the TreatyNumber to remain the same in the future. I.e. do you expect the length of the treatyNumber to change ever?

    If not, you could...

  • RE: Spool to Excel from SQL Server 2005 - help!

    If it helps, you can setup an excel file as a linked server. From there you read and write to it, as though it were a table on a linked...

  • RE: grouping joins syntax

    Sergiy is right, both about the index scans and the possibility of using hints. There is a FORCE ORDER option you can use which tells SQL server to evaluate your...

  • RE: counting rows in a table

    When you are using the NOLOCK hint, you will often see consistency errors. Using NOLOCK you can, under some circumstances, read the same row multiple times, miss rows completly etc....

  • RE: Column Name Variable

    Both suggestions are valid approachs and both would solve the problem outlined.

    I would be weary with a solution like Ronald's, simply because it introduces risk of injection attack. The...

  • RE: Pivot Cross Tab for Text Results

    Sorry I haven't been back to this post, I've been swamped at work this week. If you're in a hurry, I would do a Sergiy suggests and just make the...

  • RE: How can i detemine owner of SQL statement which is running ???

    If I am reading your comment correctly then you are saying you log in as SA so that tables and views are always owned by dbo, and that if you...

  • RE: "Parent" SQL statement that causes the TRIGGER?

    That's a good question. I've never really benchmarked it but I'm sure it would be an interesting project. 2-3 transactions/sec is pretty light load, I doubt you would notice anything,...

  • RE: "Parent" SQL statement that causes the TRIGGER?

    Here is an example (http://vyaskn.tripod.com/tracking_sql_statements_by_triggers.htm)

    DECLARE @ExecStr varchar(50), @Qry nvarchar(255)
     
     CREATE TABLE #inputbuffer 
     (
      EventType nvarchar(30), 
      Parameters int, 
      EventInfo nvarchar(255)
     )
     
    ...

Viewing 15 posts - 91 through 105 (of 192 total)