Forum Replies Created

Viewing 15 posts - 8,626 through 8,640 (of 8,760 total)

  • RE: Table Size Query

    You'll find detailed instructions in this article

    Determining space used for each table in a SQL Server database[/url] by: Greg Robidoux

    😎

  • RE: simple store procedure

    Jeff Moden (4/5/2014)


    print concat('drop table ',@tablename);

    I just can't help it. CONCAT seems so much less natural and less obvious and more difficult to read than...

    print 'drop table ' +...

  • RE: simple store procedure

    ankit.oza (4/5/2014)


    Thank you so much Guys. But I was wondering what is wrong in my version of code?

    The problem is that you cannot pass sql identifiers such as table names...

  • RE: How to Check whether the filename is todays file or not(filename like CLM_2014050).

    naresh0407 (4/5/2014)


    .Just need to validate the filename CLM_20140504..Could you please let me know how can we validate.Today date is 20140504 so the CLM_20140504 is valid file.

    Assuming that you have...

  • RE: Processing flat file with Header,Detail and Trailer

    naresh0407 (4/5/2014)


    Basically i have Header and DetailRow table seperalty.So need to transfer H row to header table and D row to DetailRow.

    Can i acheve this without scriptask?

    I have one...

  • RE: SQL Server 2008 Select All Points within Polygon

    This code creates a polygon and 200 points (lat/lon) and then selects the points that are inside the polygon

    😎

    DECLARE @POLIGON geography;

    SET @POLIGON = geography::STPolyFromText('POLYGON ((5 5, 10 5, 10...

  • RE: Find sequential numbers

    What's next, business holidays and weekends? 😀

    Just for the sake of completion:

    SELECT Eventdate,Status

    INTO #AP_DATA

    FROM (VALUES

    ('2014-01-20 18:00', 0)

    ,('2014-01-20 18:30', 0)

    ,('2014-01-20 19:00', 1)

    ,('2014-01-20 19:30', 0)

    ,('2014-01-20 20:00', 1)

    ,('2014-01-20 20:30', 0)

    ,('2014-01-20 21:00', 0)

    ,('2014-01-20 21:30',...

  • RE: SQL Server 2008 Select All Points within Polygon

    ado-712642 (4/5/2014)


    SSC thank you for your reply. I just tried using this in my table and am a bit confused. If my table structure is like this, what...

  • RE: Find sequential numbers

    J Livingston SQL (4/5/2014)


    are these just for 2012?

    I "thought" that UNBOUNDED PRECEDING/FOLLOWING was introduced in 2012...so not available in 2008?

    may well be wrong.

    nevertheless it provide a solution...

    I wonder what is...

  • RE: SQL Server 2008 Select All Points within Polygon

    Here is the code 😎

    DECLARE @POLIGON GEOMETRY;

    /* ms sample from BOL */

    SET @POLIGON = geometry::STPolyFromText('POLYGON ((5 5, 10 5, 10 10, 5 5))', 0);

    ;WITH NN1(N) AS (SELECT NM.N FROM...

  • RE: Find sequential numbers

    J Livingston SQL (4/5/2014)


    some significant changes between these two editions.....which one is in use now?

    Lets do both with the same solution

    😎

    /* SAMPLE DATA */

    SELECT

    X.NUM

    INTO #MY_NUMBERS

    FROM

    (

    ...

  • RE: COMPARE TWO TABLES COPY TABLEA VALUES TO TABLEB

    Join the two tables and use ISNULL/COALESCE to replace NULLs

    😎

    DECLARE @TABLE_A TABLE

    (

    SNO INT ...

  • RE: Blank Space in an Integer Data Type Column View

    AndrewSQLDBA (4/4/2014)


    Hello Everyone

    Happy Friday

    I am dealing with what I believe is Oracle that is the source of a SQL View.

    I am seeing a data type of Integer in the View,...

  • RE: Geometry - Parallel lines

    This can be done by shifting each point on the line by x and y (@OFFSET_X/Y in the code)

    😎

    DECLARE @line geometry = 'LINESTRING(1 1, 2 2, 3 3, 4 4,...

  • RE: Selection with conditional insert Union

    Use a CTE or a table with the additional email addresses to be added, cross join to a filtered set with code replacement and union the result to the original...

Viewing 15 posts - 8,626 through 8,640 (of 8,760 total)