Viewing 15 posts - 16 through 30 (of 496 total)
Or you could create the temp table outside the proc, before calling the proc.
CREATE PROC TEST3
AS
-- Proc refers to a temp table that...
November 4, 2013 at 7:33 am
-- a normal temp table does not work
CREATE PROC TEST
AS
SELECT 'Test' AS Col1, 'Row' AS Col2
INTO #TEST ;
GO
-- now run the proc
EXEC TEST;
-- and...
November 4, 2013 at 7:26 am
Just to be complete, the actual solution is as follows (slightly different from Mark's solution)
SELECT t.[AGE],ca.[Rate],ca.[Amount]
FROM [dbo].[Sheet1$] t
CROSS APPLY (VALUES(2.00,[2#00%]),(2.25, [2#25%]), (2.50, [2#50%]),(2.75, [2#75%]), (3.00, [3#00%]),(3.25, [3#25%]), (3.50, [3#50%]),(3.75, [3#75%]))...
October 4, 2013 at 9:13 am
Many thanks. I knew there must be a simple solution. 😀
* Note to self: Must learn about CROSS APPLY *
October 4, 2013 at 3:28 am
Sean Pearce (9/20/2013)
Try the following code and watch the memory usage for SSMS in task manager. Make sure you have saved all your work 😉
WHILE 1=1
BEGIN
PRINT '(1 row(s) affected)';
END;
What the...
September 20, 2013 at 10:10 am
Sean Pearce (9/20/2013)
Try the following code and watch the memory usage for SSMS in task manager. Make sure you have saved all your work 😉
WHILE 1=1
BEGIN
PRINT '(1 row(s) affected)';
END;
What the...
September 20, 2013 at 10:10 am
I haven't had this behaviour with SSMS but I have had it with Visual Studio and the XAML applications I'm working on and IE10 - but only on this new...
September 19, 2013 at 8:24 am
You want help because your code does not function the way you expect it.
We can help but we have to understand your code.
All we can do is , if we...
September 19, 2013 at 3:43 am
If I run this
DECLARE
@PCN_Key AS INT = '',
@CostSetKey AS INT = '1609',
@Part_Type_MP AS VARCHAR(100),
@Part_No AS VARCHAR(100) = '',
@Cost_Date AS VARCHAR(20),
@Building_No_MP AS VARCHAR(1000)='',
@qq...
September 18, 2013 at 8:20 am
There are some oddities in the code - but this could be a cutnpaste issue
you are setting some INTs to string values
@PCN_Key AS INT = '',
@CostSetKey AS INT =...
September 18, 2013 at 6:35 am
DECLARE @StartDate DATETIME;
SELECT @StartDate = DATEADD(year, DATEDIFF(year,0,GETDATE()), 0);
-- This clause is just to get some numbers: a Tally table, for joining to get a range of dates
WITH NumDays AS (...
September 13, 2013 at 2:03 am
Thanks, I have been using out of date reference book, where column number only goes up to 44, looks like loads more have been added since.
Have found the latest...
August 30, 2013 at 3:15 am
Unfortunately its a complex alphanumeric, not an integer sequence
I was a bit reticent to try indexed views because last time I did that I disappeared down a rabbit hole,...
July 19, 2013 at 6:51 am
What fixed this was connecting to SqlExpress in Visual Studio, Server Explorer - creating a new data connection.
This re-created the C:\Users\<username>\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS directory - with default copies of...
May 14, 2013 at 5:22 am
Thanks Gail,
For some strange reason in SSMS the dbname was [C:\inetpub\wwwroot\website1\App_Data\ASPNETDB.mdf] I renamed it to ASPNETDB - now the cross database query works.
So I guess I don't have to...
May 13, 2013 at 11:01 am
Viewing 15 posts - 16 through 30 (of 496 total)