Viewing 15 posts - 6,886 through 6,900 (of 8,753 total)
Steve Jones - SSC Editor (10/2/2014)
Note that THROW works well in some cases, RAISERROR in others.Learn how to use both.
It is worth noting that the THROW "message" is fixed...
October 3, 2014 at 10:18 pm
Best option would be to use T-SQL, it is simple and straight forward, here is a quick example.
This sample uses XML AUTO, by changing to XML PATH, almost any...
October 3, 2014 at 10:05 pm
Here is a simpler and better performing version of the XQuery, where the XQuery does the leg-work instead of using a union in the TSQL part. The result set contains...
October 3, 2014 at 9:54 pm
Quick questions:
A. how are you importing the XML files?
B. Do the files have as XML declaration tag (<?xml version="1.0" encoding="UTF-8" standalone="no" ?>)?
C. Can you post a more complete sample...
October 2, 2014 at 3:02 pm
Quick thought, you can do some string splitting and concatenation, not too pretty but works
😎
USE tempdb;
GO
SET NOCOUNT ON;
GO
DECLARE @DATETIMESTRING VARCHAR(12) = '200508310926';
SELECT CONVERT(DATETIME,SUBSTRING(@DATETIMESTRING,1,4) + CHAR(45) +
...
October 2, 2014 at 10:06 am
k.kavitha236 (10/2/2014)
Source is excel and destination is OLE DB
In this case, my first suggestion is to use a staging table at the destination for the aggregation. Is that an option?
😎
October 2, 2014 at 3:05 am
Quick question, what is the data source and destination (file,table etc.)?
😎
October 2, 2014 at 1:43 am
hakan.winther (10/2/2014)
Sean Pearce (10/1/2014)
Roland C (10/1/2014)
Another badly redacted question ! It gets a little boring :doze:You could always submit your own question.
I agree with you. I Think it's hard to...
October 2, 2014 at 1:37 am
An alternative solution, not as efficient as QU but should be easier to understand
😎
USE tempdb;
GO
SET NOCOUNT ON;
declare @tbl table
(LineNum int,
Code varchar(2),
Amt money,
MaxAmt money
)
insert into @tbl (LineNum, Code, Amt, MaxAmt)
values
(1,'AA',10.00,50.00),
(2,'AA',20.00,50.00),
(3,'AA',10.00,50.00),
(4,'AA',40.00,50.00),
(5,'AA',10.00,50.00);
SELECT
...
October 1, 2014 at 11:04 pm
Thank you for the question Steve.
Slightly off topic, prefer using RAISERROR to PRINT for progress reporting on long running scripts as it is almost instant and the printf functionality is...
October 1, 2014 at 10:37 pm
Ed Wagner (10/1/2014)
Eirikur Eiriksson (10/1/2014)
Evil Kraig F (10/1/2014)
... Anything else I've missed in the last week and a half or so?
Nothing much, QoDs been controversial, SQL Server will become...
October 1, 2014 at 2:11 pm
Evil Kraig F (10/1/2014)
... Anything else I've missed in the last week and a half or so?
Nothing much, QoDs been controversial, SQL Server will become Hadoop only, aliens are...
October 1, 2014 at 1:55 pm
Quick thought, on 2012 this will work
😎
SELECT * FROM sys.all_sql_modules WHERE object_id = OBJECT_ID('dbo.MYVIEW')
SELECT * from sys.dm_exec_describe_first_result_set(N'select * from dbo.MYVIEW',NULL,NULL) as x
October 1, 2014 at 1:48 pm
SQLRNNR (10/1/2014)
FTR - Jack was renewed today as well.If I forgot, Congrats Jack.
Congratulations Jack!
😎
October 1, 2014 at 12:39 pm
Jack Corbett (10/1/2014)
If you aren't on Twitter you may have missed that Jason Brimhall (SQLRNNR) got awarded MVP today.
Brilliant and well deserved!!! Congratulations Jason!!!
😎
October 1, 2014 at 12:27 pm
Viewing 15 posts - 6,886 through 6,900 (of 8,753 total)