Forum Replies Created

Viewing 15 posts - 1,111 through 1,125 (of 2,007 total)

  • RE: Hi i want modify the below store procedure.

    SELECTRight(Replicate('0',15) + AccountNumber,15) AS 'AccountNumber',

    BankNumber,

    --CASE SubProductCode WHEN '374' THEN 'P' ELSE 'D' END AS DDA_Prepaid_Indicator

    CASE WHEN SubProductCode IN ('374','376')

    THEN 'P'

    ...

  • RE: Error : Arithmetic overflow error converting numeric to data type varchar.

    Try this

    DECLARE @CurrentDate DATETIME --= Fireball_Configuration.dbo.PreviousBusinessDay()

    SELECT @CurrentDate = MAX(DATE)

    FROM Fireball_Reporting..Reporting_LoanPrices

    DECLARE @CompareDate DATETIME = Fireball_Configuration.dbo.PreviousBusinessDayByDate (@CurrentDate)

    DECLARE @count INT = 5

    DECLARE @EmailHeader VARCHAR(500) = Fireball_Configuration.dbo.GetConfigurationValue ('Fireball', 'EmailSettings - Header')

    DECLARE @EmailFooter VARCHAR(500) =...

  • RE: Error : Arithmetic overflow error converting numeric to data type varchar.

    ashuthinks (12/21/2011)


    where exactly change is needed ?

    Ummm. . .

    Cadavre (12/21/2011)


    My random guess: -

    DECLARE @CurrentDate DATETIME --= Fireball_Configuration.dbo.PreviousBusinessDay()

    SELECT @CurrentDate = MAX(DATE)

    FROM Fireball_Reporting..Reporting_LoanPrices

    DECLARE @CompareDate DATETIME = Fireball_Configuration.dbo.PreviousBusinessDayByDate (@CurrentDate)

    DECLARE @count INT = 5

    DECLARE...

  • RE: Error : Arithmetic overflow error converting numeric to data type varchar.

    My random guess: -

    DECLARE @CurrentDate DATETIME --= Fireball_Configuration.dbo.PreviousBusinessDay()

    SELECT @CurrentDate = MAX(DATE)

    FROM Fireball_Reporting..Reporting_LoanPrices

    DECLARE @CompareDate DATETIME = Fireball_Configuration.dbo.PreviousBusinessDayByDate (@CurrentDate)

    DECLARE @count INT = 5

    DECLARE @EmailHeader VARCHAR(500) = Fireball_Configuration.dbo.GetConfigurationValue ('Fireball', 'EmailSettings - Header')

    DECLARE @EmailFooter...

  • RE: Sql Query Whats wrong?

    Does this help?

    SELECT

    --FROM SalesReportRMS

    a.TransactionNumber, a.StoreID, a.Transaction_Date, a.CustomerID, a.StoreName,

    a.LogicalStoreName, a.ItemLookupCode, a.Description, a.ClassID, a.Quantity, a.FullPrice,

    a.Full_Cost, a.SalesRepID, a.NAME, a.Ship,

    --FROM [10.1.1.18\RMS20].ICLHQ.dbo.Customer

    b.EmailAddress, b.PhoneNumber, b.FirstName, b.LastName, b.HQID

    FROM dbo.SalesReportRMS AS a

    JOIN [10.1.1.18\RMS20].ICLHQ.dbo.Customer b...

  • RE: Syntax Question

    CREATE SCHEMA has to be the only statement in a batch.

    To get round the limitation, use dynamic SQL.

    IF NOT EXISTS (SELECT *

    ...

  • RE: First name And last Name in SQL

    bhaveshp.dba (12/21/2011)


    But I have A names like

    John hozack MD

    CHRISTOPHERDODSON MD

    And I dont Want last Two Words means I do not want MD then ??/?

    Either a REPLACE...

  • RE: Convert Row-based table to Column-based

    aaloneftis (12/21/2011)


    Thanks for the input. Also many thanks for the interesting links ... good reading coming up.

    Obviously I need to work on this as I don't think it is...

  • RE: First name And last Name in SQL

    BEGIN TRAN

    CREATE TABLE yourTable (

    [yourTable ID] INT IDENTITY NOT NULL,

    [First Name] VARCHAR(20) NOT NULL,

    [Last Name] VARCHAR(20) NOT NULL,

    [Full Name] AS [First Name] + ' ' + [Last Name],

    [Initial + Last...

  • RE: Query slow... using CTE

    Please read this article (http://www.sqlservercentral.com/articles/SQLServerCentral/66909/) on how best to post performance problem questions. Help us to help you!![/url] 😉

  • RE: Are the posted questions getting worse?

    Koen Verbeeck (12/19/2011)


    Roy Ernest (12/19/2011)


    You all are older than me. I am a young pup compared to some of you. 🙂

    Ahem. You all are older than me.

    I'm a child...

  • RE: Hierachy query

    Can you read the article I linked to about how best to post sample data and DDL? Personally, I don't really have the time to turn your text data...

  • RE: Hierachy query

    DDL? Sample data?[/url]

  • RE: Another query please

    Henrico Bekker (12/20/2011)


    I only inserted a few of his records, not all, so the value of COUNT is irrelevant here.

    Yes, you only inserted a few but he inserted all and...

  • RE: Another query please

    Henrico Bekker (12/20/2011)


    Lynn, he wants the datetime displayed as DATE only...

    read my previous posts...which doesnt seem to work on his installation..

    I don't think his complaint with your code was to...

Viewing 15 posts - 1,111 through 1,125 (of 2,007 total)