Forum Replies Created

Viewing 15 posts - 1 through 15 (of 44 total)

  • RE: SQL Server Full Text Search - Look for preceding and succeeding word for the search word

    Hello All,
    Any help on this? Please let me know

  • RE: Add 2 decimal fields(columns) with a CASE in SQL Server

    Eirikur Eiriksson (11/9/2016)


    A CASE statements needs to be terminated with the END keyword

    😎

    Oops, Missed it out.. Thanks for the correction.:-)

  • RE: Insert XML into SQL Server table

    Added this line to make it work, somewhere i'm missing the casting

    ,MessageBody = CAST(MSG.DATA.query('(.)') AS nvarchar(MAX))

    Thanks alot!

  • RE: Insert XML into SQL Server table

    Hi,

    Thanks for the query!

    I'm able to select all the columns from XML, But when i try to run the insert query getting below error.

    Implicit conversion from data type xml to...

  • RE: Insert XML into SQL Server table

    How about if my XML is like below? Please suggest.

    <MessageBody>

    <Header>

    <BatchGUID>b75f8f79-9c37-444c-af4a-714e42197f02</BatchGUID>

    <MsgType>703</MsgType>

    ...

  • RE: Insert XML into SQL Server table

    Yes, it is the format i get from UI, May be i need to have 2 more root elements, one to include all the messages and th other to hold...

  • RE: Apply Pivot in SQL Server

    twin.devil (8/10/2016)


    SELECT

    PromotionInd

    , ISNULL(MAX(case when vChargeCode = 'BRK' then vChargeCode end),0) AS BrkChargeCode

    , ISNULL(SUM(case when vChargeCode = 'BRK' then [ChrgAmt] end),0) AS BrkAmount

    , ISNULL(MAX(case when vChargeCode = 'CLR' then...

  • RE: Apply Pivot in SQL Server

    Hi,

    Thanks for the query, Few changes, I'm sorry for that..

    I dont want the SUM of all amounts, I just need individual amounts and also the ChargeId column like in the...

  • RE: Apply Pivot in SQL Server

    Table:

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    CREATE TABLE [dbo].[DtlChrg](

    [ID] [uniqueidentifier] NOT NULL,

    [ChrgCode] [nvarchar](10) NULL,

    [PromotionInd] [nvarchar](1) NULL,

    [ChrgAmt] [decimal](15, 6) NULL

    CONSTRAINT [PK_DtlChrg] PRIMARY KEY CLUSTERED

    (

    [ID] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,...

  • RE: Apply Pivot in SQL Server

    In the previous post, I've uploaded the images to onedrive, Please have a look at it.. I dont know how to explain this, But i need to transform all the...

  • RE: Apply Pivot in SQL Server

    twin.devil (8/10/2016)


    you Output table is not conclusive, Kindly share the output data according to your sample data.

    Hi Twin.Devil,

    Here is the desired output I'm expecting from the input data that i've...

  • RE: Apply Pivot in SQL Server

    Hi,

    Thanks for the reply. My sincere apologies, It is a data error while copying and pasting. I've multiple types of ChargeCodes and the charge amounts. I want all the chargecodes...

  • RE: Join 4 tables and get data based on a bitwise column

    With this query, I'm able to get the records.. Can you please check this query once?

    with assoc as

    (

    Select l.UsrIPAddress,l.Action,l.AppVersion,bl.Description, l.AppID, l.UsrLoginDate, l.UsrLogoutDate

    From LOG_UsrAccess l

    Cross Join UsrReportType lt

    inner join LoginType bl...

  • RE: Join 4 tables and get data based on a bitwise column

    Hi,

    Please find the data for 2 tables below.

    UsrList Table:

    INSERT [dbo].[UsrList] ([UsrID], [LoginID], [UsrName], [Gender], [MailAddr], [Email], [CreatedDate]) VALUES

    (1, N'B1ADMIN', B1A, B1Usr, M, NULL, b1@e.com,...

  • RE: Join 4 tables and get data based on a bitwise column

    I've tried with the below query, But not able to getting records for lets say, I've a record with ID 260 which is a combination of 256 + 4,. (I...

Viewing 15 posts - 1 through 15 (of 44 total)