Forum Replies Created

Viewing 15 posts - 4,816 through 4,830 (of 5,504 total)

  • RE: SQL select statement results to XL file

    What do you mean by "XL file"?

    Is it a typo meaning XML structure or do you want to store an "eXtra Large" file?

    If the former, please search for "XML Workshop"...

  • RE: Import XML into a SQL Server 2005 table

    The problem is you're trying to do the insert twice:

    1)

    FROM OPENROWSET(

    BULK INSERT TestPB FROM 'C:\Documents and Settings\xyz\Desktop\test.xml',

    SINGLE_BLOB) AS T(x)

    ) AS T(x)

    and

    2)

    INSERT INTO TestPB(firstname, lastname)

    SELECT

    You...

  • RE: Import XML into a SQL Server 2005 table

    Most probably the file is different than the sample file Flo used in his example due to the lack of any further information... Change 'C:\test.xml' to the real file destination.

    Also,...

  • RE: Date Difference Question

    How many days does a year have in your scenario?

    same question for month...

    Your example could also result in 1 year 0 month 30 days (assuming a year with February 29th)...

  • RE: Help with another select query please

    Seems like the insert statement doesn't reflect your situation (I'd assume [SHP_ZIP] to have NULL values...).

    In that case, (to complete Daves hint):

    SELECT

    [ORD_NBR],

    [1ST_NME],

    [LST_NME] ,

    ISNULL([SHP_ZIP],[BILL_ZIP]) AS zipcode...

  • RE: Cursor Fetch into XML Variable

    What is the reason to send one xml node at a time?

    Wouldn't it be easier to convert all rows per batch into one xml variable (matching the node structure, of...

  • RE: URGENT: Problem with SQL Server Linked Servers and sp_setnetname

    Did you check that the linked server is available at all?

    (e.g. by test the connection using right click on the linked server in SSMS?)

    Btw: Seems like the question wasn't that...

  • RE: Exporting Data from SQL Server

    Button (im)pressed. Nice one, Jeff!

    I thought there was an easy solution out there...

  • RE: Subtraction

    Glad I could help.

  • RE: Exporting Data from SQL Server

    Well, that would turn the "old fashioned" DOS command option into a "retrofit version" 🙂 But the basic concept would be the same...

    So, if your company would accept it I...

  • RE: Exporting Data from SQL Server

    AFAIK there is no "easy" way of appending to an existing file.

    I remember a few options being discussed a while ago (but I can't find the thread...):

    a) load the content...

  • RE: Subtraction

    Would something along those lines do it?

    DECLARE @t table(Type char(3),Cnt int, Date datetime)

    INSERT INTO @t values('Foo' ,206, '11/04/2009')

    INSERT INTO @t values('Foo' ,509, '11/05/2009')

    SELECT

    t1.type,

    t1.date,

    t1.Cnt,

    t2.cnt as CntYesterday,

    t1.cnt-t2.cnt as Diff...

  • RE: Need to add a FY Dates Table

    marty.seed (11/5/2009)


    ...If a week has wed-sat falling in the next month it is considered a new week, new month.

    The business rule for defining a Fiscal Month is as you have...

  • RE: PIVOT CLAUSE

    You're very welcome!

    Actually, I felt like I had to do some "charity work" since I had a real bad day a work...

    But now I'm feeling better! Thank you for your...

  • RE: Need to add a FY Dates Table

    What is the business rule for the beginning of a new fiscal year (always first Sunday of December?)

    What is the business rule for defining a fiscal month? Is it based...

Viewing 15 posts - 4,816 through 4,830 (of 5,504 total)