Viewing 15 posts - 31 through 45 (of 147 total)
Many thanks for the response ChrisM,
What does your dbo.IF_Calendar function look like? I've tried replacing it with a join to my calendar table but it generates an error when...
July 30, 2013 at 7:33 am
Apologies,
Below is a small script to create the data 🙂
CREATE TABLE [dbo].[Salesman](
[SalesmanID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[Name] VARCHAR(50) NULL
CONSTRAINT [PK_Salesman] PRIMARY KEY CLUSTERED
(
[SalesmanID] ASC
)WITH (PAD_INDEX = OFF,...
July 30, 2013 at 4:59 am
Many thanks Lynn, That's exactly what I needed. I'd never have come up with that.:-D
August 1, 2012 at 1:17 am
Sorry, I've not been particularly clear on this...
I want to pass in one or more customers together with a start date (or start month\year).
I want to return back for all...
July 31, 2012 at 3:53 pm
Hi Sean,
Thanks for your input on this:-) I guess if I was storing it as dates then the day part would always be a dummy and set to 01...
July 31, 2012 at 3:44 pm
Hi Sean,
I'm only going to insert the rows for the passed in customers and I'm only going to select the rows for the passed in customers. The example data posted...
July 31, 2012 at 3:38 pm
Hi Thanks for your response.
I disagree on the desired results - there were already rows in the table for customers 1, 2 and 3. All I need to do is...
July 31, 2012 at 3:25 pm
I'm thinking I need some sort of numbers table - I've created a table below to join to (I just can't figure out how to join to it correctly)...
CREATE TABLE...
July 31, 2012 at 3:17 pm
Ok,
CREATE TABLE [dbo].[tblExpectedResults](
[intID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[intCustomer] [int] NULL,
[intMonth] [int] NULL,
[intYear] [int] NULL,
[monAmount] [money] NULL,
[NewRow] [int]
CONSTRAINT [PK_tblExpectedResults] PRIMARY KEY CLUSTERED
(
[intID] ASC
)WITH (PAD_INDEX = OFF,...
July 31, 2012 at 3:08 pm
Sorry, I thought I had clearly described what I wanted... I need a row per month\year inserted where a row for a year\month combination doesn't already exist for the customer...:-)
July 31, 2012 at 2:56 pm
Here is setup code...
CREATE TABLE [dbo].[tblInvoice](
[intID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[intCustomer] [int] NULL,
[intMonth] [int] NULL,
[intYear] [int] NULL,
[monAmount] [money] NULL,
CONSTRAINT [PK_tblInvoice] PRIMARY KEY CLUSTERED
(
[intID] ASC
)WITH (PAD_INDEX ...
July 31, 2012 at 1:56 pm
Hi Lynn,
Thanks for your response...
Actually I use a tally table to split, I only use the code posted if the length of the passed in string is greater than 2...
July 31, 2012 at 1:47 pm
The inserts are done from the front-end application in a loop up via a stored procedure which does an Insert one record at a time.
December 20, 2011 at 9:01 am
Dev (12/20/2011)
Charlottecb (12/20/2011)
Since I don't know exactly what time of the day the majority of records will be loaded, I...
December 20, 2011 at 5:21 am
Thank you Dev and GilMonster for the responses.
Since I don't know exactly what time of the day the majority of records will be loaded, I was thinking of putting...
December 20, 2011 at 4:39 am
Viewing 15 posts - 31 through 45 (of 147 total)