Forum Replies Created

Viewing 15 posts - 61 through 75 (of 402 total)

  • RE: Naming Convention for UDF's, Views and SP's

    Michael Valentine Jones (2/13/2013)


    Andy Hyslop (2/11/2013)[/b

    ...

    Why should User Defined Functions not be prefixed UDF or udf, views not Prefixed with VW or vw and Stored Procedures not USP or usp

    ...

    That...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Naming Convention for UDF's, Views and SP's

    Thanks all for the replies - most helpful 🙂

    I have never prefixed tables with tbl but I have prefixed usp's and views

    It just seemed like an odd question the way...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: SQL Subtraction - Seperate rows

    kravitej9 (1/29/2013)


    Can u send me the query

    This may help..

    DECLARE @temp AS TABLE

    (v1 INT, v2 INT, v3 INT)

    INSERT INTO @temp

    SELECT 1,3, NULL UNION ALL

    SELECT 3,4,5 UNION ALL

    SELECT 4,2, NULL UNION ALL

    SELECT...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: SQL Query

    Hi

    Your DDL seems to be missing VOYAGE_NUM in the table MG_VSLVOY_HEADER

    Andy

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Separate Data in a Derived Column

    Hi

    This link should help you

    http://www.sqlservercentral.com/articles/Tally+Table/72993/

    Andy

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Qry

    Hi

    Difficult without a little more information however this may point you in the right direction

    declare @table as table

    (id int)

    INSERT INTO @table

    SELECT 100 UNION ALL

    SELECT 101...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: SSIS Package fails in Production

    Debug the source columns and ensure that the destination columns match the correct data types and lengths.

    +1

    What I find interesting is that the package works fine when I point to...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Adding a Sequence Number to the records from LKUP No match output

    Because I don't know your structure it's a little difficult, but...

    I have had to do similar things in the past (although I insisted on design changes) however a concatenation of...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Adding a Sequence Number to the records from LKUP No match output

    Any reason why you can't use the PK from the source table as the PK in the destination?

    But for some reason they have gone by this design.

    Crazy! :crazy:

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Adding a Sequence Number to the records from LKUP No match output

    The Destination table does not have an identity field. Hence, i would have to increment the PK value myself before inserting

    This sounds like a nightmare waiting to happen for you!

    Is...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Null vs ''

    case when field ='' then NULL

    else field

    END as field

    NULLIF(YourColumn, ' ')

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Joins?

    Hi

    This should help

    SELECT a1.CUSTID, a1.COMPANY AS [Co Name], a2.STATUS AS [TYPE], a3.ORDPROD AS [Product]

    FROM dbo.TABLE1 AS a1

    INNER JOIN dbo.TABLE2 AS a2 ON a1.CUSTID = a2.CUSTID

    LEFT OUTER JOIN...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Working Day is Current Month

    No Probs 🙂

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Checking values in multiples columns

    Where is the DDL? What is yuor question? Why did post half a statement in 1970's Sybase dialect? Is this what you meant, but did not know how to write?...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • RE: Working Day is Current Month

    Hi

    The easiest way to achieve this is too use a calendar table with a isWorkingDay or some such column you can then just use on this based on the current...

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

Viewing 15 posts - 61 through 75 (of 402 total)