Forum Replies Created

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

  • RE: Spatital Data Conversion

    The way you are trying to convert the Geometry to a Geography will cause problems even if it does not error.
    The current error that you have is due to...

  • RE: How to Make Scalar UDFs Run Faster (SQL Spackle)

    I did a quick test on an SQL Express 2016 instance and can confirm the differences are not as drastic as they use to be.

    SQL Server 13.0.2151 (express)

    16 Gb Memory

    Windows...

  • RE: Finding a substring and extracting a number associated with it

    Couldn't help myself but have a little play with this myself.

    Basically this determines the order of the words admission and discharge, grabs and remove the date (if possible) from the...

  • RE: Geometry - Parallel lines

    roy jackson (9/2/2015)


    @Ten Centuries

    This is nice, however the resulting left and right side lines have the incorrect order of vertices.

    Do you know how to fix?

    Thanks!

    Note - the query...

  • RE: Column manipulation with ALTER TABLE

    Nice back to basics question thanks.

    I've always found the fact the COLUMN is not even an optional keyword for ADD a bit strange, but it's one of those things that...

  • RE: Spatial Import of Census Shapes

    While I don't have any direct experience with this (I have other tools FME by Safe Software), the following links may help.

    https://shapefilesource.codeplex.com/ - For a SSIS shapefile reader

    http://blog.strictly-software.com/2011/11/error-copying-tables-importing-or.html - For...

  • RE: EXECUTE

    Good question thanks. I've never used the sysname datatype before.

  • RE: t-sql to create simple bar graph image file to be inserted into email

    Have fun with it Jeff ... but don't let it consume your Thanks Giving weekend. Re-reading this thread, I might have to have another look at this.

  • RE: Misbehaving UNION query

    That's weird, considering that it did work for a while. I have seen complex queries get themselves messed up from time to time, but that is generally from the...

  • RE: Remove Characters

    Luis Cazares (11/11/2014)


    Why do I always forget the safety net? I live on the edge. :hehe:

    I usually do as well, right up until the fall 😀

  • RE: Remove Characters

    Another thing, all the options so far (except the parsename) will fail if there isn't a '-'.

    My preference is generally to use STUFF, but it's much the same as the...

  • RE: Parsing address

    A variation on Ed's query to take into account the rules that you mentioned. It still uses the Delimited8kSplitter, but checks the items rather than the itemnumbers

    SELECT address,

    MAX(CASE WHEN...

  • RE: Challenge with Pivoting data?

    In the query that I provided it assigns its own number to the bins of each item in alphabetical order.

    Run the following query to see an example

    SELECT * INTO #SAMPLE...

  • RE: SQL Query Help

    Hi

    The following should provide the result you want and perform better

    SELECT LID,

    SUM(CASE WHEN StatusCode = 'QAC' THEN 1 ELSE 0 END) QAC_COUNT,

    SUM(CASE WHEN StatusCode = 'QAF' THEN 1 ELSE...

  • RE: Challenge with Pivoting data?

    Hi

    I'm pretty sure you don't require while loops to do this.

    The following should do what you want.

    WITH numberBinsPerItem AS (

    SELECT ItemCode,

    ItemDescription,

    OrderQty,

    BinLabel,

    ROW_NUMBER() OVER (PARTITION BY ItemCode ORDER BY BinLabel) BinNum

    FROM A1Warehouse..BINLOCAT

    )

    --...

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