Forum Replies Created

Viewing 15 posts - 6,886 through 6,900 (of 8,753 total)

  • RE: raiserror level

    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...

  • RE: Create XML file from AS400 stored procedure returning multiple datasets

    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...

  • RE: Xquery

    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...

  • RE: XML File Encoding before insert into XML Column

    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...

  • RE: having trouble changing varchar to datetime

    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) +

    ...

  • RE: Transformation Suggestion for joining an extra column (SSIS).

    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?

    😎

  • RE: Transformation Suggestion for joining an extra column (SSIS).

    Quick question, what is the data source and destination (file,table etc.)?

    😎

  • RE: Ranking

    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...

  • RE: Seems like a simple problem. Need to decrease an Amt by a fixed maximum spread over several rows.

    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

    ...

  • RE: raiserror level

    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...

  • RE: Are the posted questions getting worse?

    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...

  • RE: Are the posted questions getting worse?

    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...

  • RE: Is their a way to get metadata info about views

    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

  • RE: Are the posted questions getting worse?

    SQLRNNR (10/1/2014)


    FTR - Jack was renewed today as well.

    If I forgot, Congrats Jack.

    Congratulations Jack!

    😎

  • RE: Are the posted questions getting worse?

    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!!!

    😎

Viewing 15 posts - 6,886 through 6,900 (of 8,753 total)