Forum Replies Created

Viewing 15 posts - 9,751 through 9,765 (of 18,923 total)

  • RE: Data type for Credit Card

    I think this works

    SELECT CONVERT(BIGINT, 1234567890123456) AS CCNumber

  • RE: Data type for Credit Card

    All interesting points for the initial validation.  I'm wondering, once the credit card has been validated once,  Do you still have to do lots of manipulation with those numbers, or...

  • RE: Need to create & select #temp data table

    Ya I'm kind of sick of that don't use dynamic sql discussion.  If they want to hang themselves, I let 'em.  I'm not here to save the world anymore.  But...

  • RE: sort order

    Should be able to...  can you post the code?

     

    If worse comes to worse, you can always do the distinct query in a derived table, then apply the dynamic sort.

  • RE: Need to create & select #temp data table

    The table is created in the exec statement.  It is automatically destroyed when that connection is dropped (before the execution goes back to the procedure).

    You'll have to create that table...

  • RE: Index review?

    Is there any way to get the rowcount in profiler (directly, without re-rerunning the query)?  I'm guessing no, but hopping for a yes on this one!

  • RE: Data type for Credit Card

    Here's where I show my in-experience.  Bigint assumes that the card number will NEVER have a leading 0.  Now I have never seen that on a card but I would make sure...

  • RE: Data type for Credit Card

    Varchar would be my guess (without any experience in that domain).

  • RE: sort order

    Still need to have a dynamic sort... or 1 query / sp / function per variation to have the optimal query plan...

  • RE: View sentence error

    That's alright, we're all here to learn .

  • RE: sort order

    To complete this, I strongly suggest you validate the input order variable :

     

    if @SortOrder IN ('jobid', 'empName', 'empid')

    begin

     

    end

    else

    begin

    raiserror ('Invalid sort order', 13, 1) --this avoids any possible sql injection

    end

  • RE: DBA without system administrator privileges

    What movies was that?

  • RE: View sentence error

    I'm sure Jeff will come up with a more complete answer, but one example is that you'll create that view, then a few weeks later, someone else will use this...

  • RE: View sentence error

    You should be able to get this to work...

    SELECT     TOP 100 PERCENT ITEMNMBR, SUM(TRXQTY) AS Expr1, SUM(CASE WHEN datediff(month, docdate, getdate()) = 0 THEN TRXQTY ELSE 0 END) AS period1

    FROM         dbo.IV30300

    GROUP...

  • RE: Performance of badly designed database

    First question : data warehouse or transactional database (reporting or working)?

Viewing 15 posts - 9,751 through 9,765 (of 18,923 total)