Forum Replies Created

Viewing 15 posts - 26,251 through 26,265 (of 26,484 total)

  • RE: is string

    Interesting, SELECT ISNUMERIC('-') returns the value 1.  If you do the following, you see why:

    SELECT ISNUMERIC('-'), cast('-' as int)

    The cast returns 0 (zero).

  • RE: is string

    Wouldn't select * from some_table where not isnumeric(some_column) give you what you were looking for?

  • RE: Questions on howto properly setup for backup and restorign

    If Auto-Shrink is on, it may.  It is better if auto-shrink is not on, and you can schedule a process to shrink the file during a time of less database...

  • RE: Difficult recursive query problem

    Not necessarily the most elegant solution, but based on your sample data, it seems to work:

    select distinct

        d1.hospital_id,

        d1.patient_id

    from

        #diagnosis d1

    where

        exists (select 1 from #diagnosis d2 where d1.hospital_id =...

  • RE: Questions on howto properly setup for backup and restorign

    An earlier post said to truncate the transaction log after running a full backup, I'd run the full backup immediately after truncating the transaction log.  This will then allow the...

  • RE: comma seperated name question

    We do the best we can with what we have.

  • RE: comma seperated name question

    Ninja,

    I keep forgetting about the right() function.

  • RE: comma seperated name question

    Try something like this:

    declare

    @varStr varchar(255)

    set

    @varStr = 'Jones, Tom'

    select

  • RE: Should I index money column?

    Indexing the money fields would only make sense if your queries are selecting on those fields.  For instance, you are looking for all products in inventory with a unit price...

  • RE: LDF not dumping after backup job concludes

    You could consider those long running, but there also could be updates or loads that take several minutes to hours to complete as well depending on what type of database...

  • RE: LDF not dumping after backup job concludes

    What is your current backup strategy?  If your database is in Full Recovery Mode, but you are only taking Full Backups, the transaction log will not be truncated.  This only...

  • RE: Finding TOP values without resorting to cursors!

    Based on your simplified example, try this:

    SELECT

    * FROM tbl1 a

    where

    a.DataValue in

  • RE: Import Excel data into SQL Database

    Easiest way I have found is to export (or save) the data from Excel as a CSV file and import hte data from that file.

     

  • RE: Having trouble with an inner join

    Try this for your udf:

    CREATE FUNCTION [dbo].[ItemsRentEligible] (

        @billDate DATETIME,

        @hiDate DATETIME,

        @period INT,

        @custId INT)

    RETURNS TABLE AS

    RETURN(

    SELECT

        OrderItem.ORDER_ID,

        OrderItem.PRODUCT_CODE,

        OrderItem.PLACEMENT_DATE,

        OrderItem.PICKUP_DATE,

        OrderItem.CUSTID,

        Products.RENT_ELIG,

        OrderItem.QTY,

        Products.TAXABLE,

        OrderItem.PRICE,

        OrderItem.BILL_DATE,

        Products.PRODUCT_DESC,

        PRODUCTS.RENT_CHG

    FROM

       ...

  • RE: User access

    That is possible, but I haven't ever had a request like LMtz.  This is how LMtz can grant the user access to creating views.  Unfortunately, I can't come up with...

Viewing 15 posts - 26,251 through 26,265 (of 26,484 total)