Viewing 15 posts - 91 through 105 (of 139 total)
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. ...
August 18, 2010 at 11:15 am
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?
August 17, 2010 at 11:14 am
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...
August 5, 2010 at 10:46 am
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...
August 5, 2010 at 9:22 am
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...
August 4, 2010 at 2:01 pm
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
...
August 4, 2010 at 1:42 pm
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...
August 4, 2010 at 12:43 pm
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...
August 4, 2010 at 12:28 pm
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...
July 27, 2010 at 1:14 pm
The RowNumber() approach looks nice.
Is that a Server 7 command? I'm having trouble with it.
July 26, 2010 at 11:12 am
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...
July 15, 2010 at 11:34 am
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...
July 8, 2010 at 7:49 am
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...
July 8, 2010 at 6:41 am
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...
July 8, 2010 at 6:32 am
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...
July 6, 2010 at 1:35 pm
Viewing 15 posts - 91 through 105 (of 139 total)