Viewing 15 posts - 5,011 through 5,025 (of 10,144 total)
Post the ddl (the CREATE TABLE script) for table fact_sales.
March 20, 2013 at 3:52 am
-- make some sample data
DROP TABLE #Sample
CREATE TABLE #Sample (Record INT, [Concatenate] CHAR(12))
INSERT INTO #Sample (Record, [Concatenate])
SELECT 1, '201201010510' UNION ALL
SELECT 2, '201201010511' UNION ALL
SELECT 3, '201201010514' UNION ALL
SELECT 4,...
March 20, 2013 at 3:31 am
Shanmuga Raj (3/20/2013)
Conversion failed when converting the varchar value ' | | |0|0|0' to data type int.
ChrisM@Work (3/20/2013)
DROP TABLE...
March 20, 2013 at 3:03 am
Depending upon existing indexes, this could be a significant improvement:
DROP TABLE #fact_sales
CREATE TABLE #fact_sales (agent_id INT, product_code INT, product_id VARCHAR(5))
INSERT INTO #fact_sales (agent_id, product_code, product_id)
VALUES
(1,1,'1'),
(1,1,'2'),
(1,1,'3'),
(1,1,'4'),
(1,1,'5'),
(2,3,'1'),
(2,3,'1'),
(3,2,'1'),
(3,2,'1'),
(4,1,'1'),
(4,1,'2')
CREATE CLUSTERED INDEX cx_Everything...
March 20, 2013 at 2:34 am
Have a play with this;
DECLARE
@LastBookNo INT = 23,
@LastPageNo INT = 80,
@BooksToInsert INT = 2,
@PagesPerBook INT = 10
;WITH E1(N) AS (
...
March 19, 2013 at 7:19 am
DDL for the table and all indexes, and the actual plans for both queries, would help diagnosis.
An index on sessionid including status and rsn may solve the problem.
March 19, 2013 at 6:55 am
kapil_kk (3/19/2013)
ChrisM@Work (3/19/2013)
kapil_kk (3/18/2013)
...How to achieve this?plz help
Do you need help with the stub code I posted?
Thanks Chris, I have implemented that thing....
But I am not clear why you posted...
March 19, 2013 at 6:34 am
bhushan_juare (3/19/2013)
Yes, my concern is absolutely right because sales_data table gave me all order quantities details(i.e MATNR) whose Purchase Order is generated and ready to dispatched else if...
March 19, 2013 at 6:27 am
;WITH Sampledata (MyString) AS (
SELECT 'value Based' UNION ALL
SELECT 'value Discount' UNION ALL
SELECT 'Percentage Discount')
SELECT
s.MyString,
Word1Initial = LEFT(s.MyString,1),
Word2Initial = SUBSTRING(s.MyString, x.pos,1)
FROM Sampledata s
CROSS APPLY (SELECT pos =...
March 19, 2013 at 2:36 am
kapil_kk (3/19/2013)
I want to extract first letter from these words as 'VB', 'VD', 'PD'.
How...
March 19, 2013 at 2:14 am
kapil_kk (3/18/2013)
...How to achieve this?plz help
Do you need help with the stub code I posted?
March 19, 2013 at 1:52 am
opc.three (3/15/2013)
PS Forgot to mention the function is undocumented so take that into consideration.
It's a cough scalar function too.
Combine the best bits of Lynn's and Scott's solutions and roll...
March 18, 2013 at 10:05 am
Nested loops prefetch bail-out?
Try concatenating on the remote side and casting the result to something sensible. You might also benefit from using two OPENQUERY queries (to guarantee remote execution of...
March 18, 2013 at 7:26 am
walter.habegger (3/18/2013)
I removed the .NET Framework 3.5.1 (KB2789645) and 4 (KB2789642)...
March 18, 2013 at 6:36 am
Viewing 15 posts - 5,011 through 5,025 (of 10,144 total)