Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)

  • RE: Getting @@identity in an sp that hits another server...

    You haven't provided a lot of info about your table and your actual queries (and the table names in your two queries don't match), but if I read your situation...

  • RE: how do I use dynamic sql inside functions?

    Thanks, Nicolas, that is what I meant. 🙂

    Luciana, from what you have shown us, you do not need to use dynamic SQL nor a cursor to do this.

    Just use this...

  • RE: how do I use dynamic sql inside functions?

    Luciana,

    If I understand what you are up to, once you have the values in a table, could you not simply use a formulation like this:

    --

    create table x (x char)

    go

    insert x...

  • RE: Date Conversion

    Simply update test2 set datefield = convert(char, intfield) should be sufficient. (pressed ENTER too soon 🙂

  • RE: Date Conversion

    Since yyyymmdd is actually a valid date format (ISO), SQL server should be smart enough to know it's a date if it's simply treated as char. So, in mimorr's solution...

  • RE: Updating Table

    Is this more or less what you had in mind?

    select EntryVal.*

    from ( select ID_Field, max(Begindate) MaxBegin,

    ...

Viewing 6 posts - 1 through 6 (of 6 total)