Forum Replies Created

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

  • RE: Truncate

    I've added ddl_admin to the people that need to execute this Stored Procedure.

    It has worked in testing.

    I'll know for sure next week when it's deployed, but it looks good. ...

  • RE: Stored Procedure Called Through Access w/Error 3146

    Also, I use this connection string

    "ODBC;Driver={Sql Server};Server=SQLServer;Database=TPrj;Trusted_Connection=Yes" for my Pass-Though queries.

    I have read there is a better, more stable, driver.

    Can someone point me to one or is this okay?

  • RE: How do you do RBAR - Record Sets

    My bad,

    When I said multiple rows I didn't mean data that I could sum.

    i.e.

    Field_1, Field_2

    Main_ID, Data_A

    Main_ID, Data_B

    Main_ID, Data_C

    I would rather

    Main_ID, Data_A, Data_B, Data_C.

    I usually do this with a Join (or...

  • RE: How do you do RBAR - Record Sets

    Perhaps when I get the calcualtion finished I'll be back for your help.

    Honestly it's a bit lengthy and hard to follow just giving you the list of tables.

    This does not...

  • RE: How do you do RBAR - Record Sets

    I apoligize everyone,

    A little more research and I found it.

    But if anyone needs it, here it is:

    'Using FETCH to store values in variables'

    http://msdn.microsoft.com/en-us/library/ms180152.aspx

    USE AdventureWorks2008R2;

    GO

    -- Declare the variables to store the...

  • RE: How do you do RBAR - Record Sets

    How about this problem. I found this on MSDN and can easily adapt it to my table.

    DECLARE Employee_Cursor CURSOR FOR

    SELECT BusinessEntityID, JobTitle

    FROM AdventureWorks2008R2.HumanResources.Employee;

    OPEN Employee_Cursor;

    FETCH NEXT FROM Employee_Cursor;

    WHILE @@FETCH_STATUS = 0

    ...

  • RE: How do you do RBAR - Record Sets

    I apoligize for not being clear, I'm still new at this and I do appreciate your help. However I actually have used Updates, Updates with Where, Updates with Where...

  • RE: How do you do RBAR - Record Sets

    I use Update Where often. Sometimes with several Joins and Case (Select) as part of the Set. You're right these can get complicated and one I'm using right...

  • RE: Increment a field starting with the same number everytime.

    Yeah! Works great, thanks.

    Okay, another question.

    What if the table is like this?

    CREATE TABLE [dbo].[tbl_Temp](

    [strStatus] [nvarchar](1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,

    [intCo] [int] NOT NULL,

    [intDiv] [int] NOT NULL,

    [intGroup] [int] NOT NULL,

    [intSeq] [int] NOT...

  • RE: Increment a field starting with the same number everytime.

    The RowNumber() approach looks nice.

    Is that a Server 7 command? I'm having trouble with it.

  • RE: Can you 'Select' from a stored procedure

    Wow, lots of great answers.

    First, for some reason I never thougth of using "execute" insteat of select. Brillant! Thanks, I'm still learning.

    Second, yeah, I used to put all...

  • RE: Is there a Do While loop?

    You did this on your phone?

    That's great! Thanks,

    However you are right.

    The main reason I was going with a loop is because I could not get the bulk insert to...

  • RE: Is there a Do While loop?

    I like the idea of Unions and have used them before, though I've never used them in inserts.

    I'll be testing these shortly; it really looks like a good idea and...

  • RE: Is there a Do While loop?

    Actually I read it.

    I thought I posted the table definition above though probably not well enough.

    No I didn't post sample data as I thought my question was more general nature.

    Thank...

  • RE: Is there a Do While loop?

    Great ideas but... there's always a but.

    I should have given more info. The individual unions for a single insert won't work because there may be multiple lines per user...

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