Viewing 15 posts - 931 through 945 (of 1,228 total)
kr.nithin (4/19/2011)
This is a Vendor table. This already has a primary key. The requirement is Alphabets as the unique key rather than the numeric primary key.
So the numeric "primary...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 19, 2011 at 7:51 am
Comment out the joins to the tables apart from bm and bp:
FROM[VEMA-FACS1].FUELFACS.dbo.bulk_movement AS bm
INNER JOIN[VEMA-FACS1].FUELFACS.dbo.bulk_product AS bp
ON bp.bulk_movement_id = bm.bulk_movement_id
--INNER JOIN[VEMA-FACS1].FUELFACS.dbo.terminal_product AS tp
--ON tp.terminal_product_number = bp.terminal_product_number
--INNER JOIN[VEMA-FACS1].FUELFACS.dbo.supplier AS...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 19, 2011 at 7:37 am
kr.nithin (4/19/2011)
I have a table that is already populated. I need to add a new column & the values in the column should be AA, AB, AC, AD, AE,...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 19, 2011 at 7:24 am
For an update like this, the Running Totals algorithm described here[/url] by Jeff Moden can't be beaten. If you were looking to output the results in the manner you describe...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 19, 2011 at 6:43 am
Karan_W (4/19/2011)
... If all the statement inside try clause execute successfully then commit the transaction else roll back all transaction...
How about posting the whole sproc?
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 19, 2011 at 6:37 am
marwa.elghali (4/19/2011)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 19, 2011 at 4:00 am
Check out the rules for identifiers in Books Online. Embedding a "dot" in the column name breaks the rules for regular identifiers and forces the use of delimiters. Why not...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 19, 2011 at 3:11 am
Put the COLLATE into the SELECT from the #temp table:
Declare @SaleCategory as varchar(255)
Set @SaleCategory = 'Outer Wear, Mens, Foot Wear, N/A'
select Item
INTO #mytemp
from [dbo].[DelimitedSplitN4K] (@SaleCategory, ',')
Select distinct...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 1:44 pm
doug 40899 (4/18/2011)
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 12:55 pm
Jeff's posted an updated version of the string splitter here.
I usually stream the results of a string-splitter into a #temp table then use that in the main query.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 11:50 am
Tom.Thomson (4/18/2011)
Jeff Moden (4/17/2011)
Tom.Thomson (4/17/2011)
Incidentally, you can't call a stored procedure using OPENQUERY either.Maybe not, but OPENROWSET works a treat.
.... Spending too much time on learning Castellano and...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 11:38 am
parthi-1705 (4/18/2011)
Lynn Pettis (4/18/2011)
parthi-1705 (4/18/2011)
Lynn Pettis (4/18/2011)
select
'id: ' + id + ';' +
'name: ' + name + ';'...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 11:35 am
applebutton (4/18/2011)
DECLARE @SaleDate datetime;
SET @SaleDate = GETDATE();
EXEC dbo.GetSales @SaleDate, '''Outer Wear'', ''Mens'', ''Foot Wear'', ''N/A''';
GO
DB table has data.
If hard code it like this:
a.
category...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 10:24 am
parthi-1705 (4/18/2011)
Lynn Pettis (4/18/2011)
select
'id: ' + id + ';' +
'name: ' + name + ';' +
...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 10:11 am
Try this - it might not give you exactly what you need but it will be close enough for you to correct:
SELECT policy, currency, sequence, amount,
GroupID = DENSE_RANK() OVER(PARTITION...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 18, 2011 at 10:05 am
Viewing 15 posts - 931 through 945 (of 1,228 total)