Forum Replies Created

Viewing 15 posts - 76 through 90 (of 541 total)

  • RE: what to do with SUSPECTED DATABASE???

    If it's suspect you should question it; find out if it's guilty or not.

    Be careful with suspect databases, there is a reason...

  • RE: Copy table structure from a another one.

    This also works...

    select top 0 *

    into #Temp

    from Table

  • RE: Updating Multiple tables dynamically

    Yikes...then I'd say you're SOL for an easy solution, expect to recreate the archive table every time.

    The only other option I see is to compare each value for each row...

  • RE: Datetime field and SQL statement condition (between, ....)

    erncelen

    No, your problem was not the date format.  As ron K pointed out, the problem is the order of dates in your "between" clause.  Earliest date first, latest date last. ...

  • RE: Updating Multiple tables dynamically

    james,

    You know, probably the easiest solution is to delete the SQL record and re-import it from the AS400.  This can be done pretty easy with a couple pieces of information.

    Unique...

  • RE: Help with Loop or cursor

    Wow...I wonder what's going to happen when I post this.

    Just wanted to say, nice technique, Rob...somehow I missed that one.  It's funny, because I was looking at a problem that...

  • RE: tune up query

    declare @var table (var1 char(2) Primary Key)

    Insert @var values ('b1')

    Insert @var values ('b2')

    Insert @var values ('b3')

    Insert @var values ('b4')

    Insert @var values ('b5')

    Select Value

    from @var    v

    JOIN tbl_value  t on...

  • RE: Replacing tags

    I'd recommend a simple technique like this.  If your tags need different variables for each Row, you'd want to set this up as a Parent/Child relationship, like so:

    Tag

     TagID

     Value

    Customer

     CustomerID

     FirstName

     LastName

     Email

    CustomerTagRepl

     TagID

     CustomerID

     Value

    ------------------------------------------------------------------------------------------

    ---following should be a...

  • RE: REAL ID

    This obviously isn't something with simple answers, DSP.  Sure, you like your privacy.  But what about when a convicted felon moves in next door?  Do you support his right to...

  • RE: REAL ID

    I read this fascinating book recently, called "The Transparent Society", but Davin Brin.  This book deals with privacy in the modern age.

    Brin's opinion on the matter is that technology is...

  • RE: varchar vs. nvarchar - performance?

    Steve,

    Bit can be grouped on:

    declare @bit table (cbit bit)

    Insert @bit values (1)

    Insert @bit values (0)

    select cbit, count(*)

    from @Bit

    group by cbit

     

  • RE: Help With Default Value

     

    declare @Date datetime

    select @Date = getdate()--dateadd(hh, 0, getdate())

    select

     cast(Case

      When datepart(hh, @Date) < 14

       then convert(varchar(12), @Date, 101)

       Else

        Case datepart(dw, @Date + 1)

         when 1 then convert(varchar(12), @Date+ 1, 101)

         When 7 then...

  • RE: Converting a varchar to datetime

    Not to piddle, but this will perform better.

    update Inventory

    set DateColumn = convert(datetime, DateStringColumn, 101)

    where isdate(DateStringColumn) = 1

  • RE: Yet another simple question

    To answer your first question...regarding Like in (...).

    While you can't do this syntax directly, you can get the same results by putting all the values in the "IN" into a...

  • RE: Like with Variable

    A clustered index seek will be used with a Like statement, as long as the wildcard is at the end of the search variable and not at the beginning.  Switch...

Viewing 15 posts - 76 through 90 (of 541 total)