Forum Replies Created

Viewing 15 posts - 5,926 through 5,940 (of 14,953 total)

  • RE: need help with loading a string

    How consistent is the source data? Does it ALWAYS have commas where you've listed them in your samples?

    If so, substrings based on the commas should do what you need....

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Identity messed up on merge replication

    New snapshots.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: 2 sep. queries are fast except when executed together via UNION ALL

    Does the union version consistently run indefinitely? Or have you only tried once or twice?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: SQL Row Level Security in a Relational World?

    How static is the security? Do you have lots of groups, or just a few? Does the group-level security change frequently, or almost never, or somewhere in between?...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Time Duration for Middle Dates

    So, a given date will only have either 2 entries or 4 entries, never 3 or 5 or 6?

    Is that correct?

    If so, you could use Row_Number() in a CTE to...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Reading SQL Server's Transaction Log

    fn_dblog changed slightly between SQL 2005 and SQL 2008. This was, of course, without notification or documentation. If I remember correctly, it changed from 2000 to 2005 as...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Assign a transaction number to separate instances of daily employee sign-in/sign-out transacations.

    You're welcome.

    No ratings on this site.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Time Duration for Middle Dates

    I'm not entirely clear on what you mean by "middle dates", but duration queries are usually done by using datediff on the two values.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: ssis package runs fine in business intelligence studio but fails in sql server agent

    It usually is something as silly and simple as that.

    Good job on finding it.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Identity messed up on merge replication

    You'll probably need to at least pause and restart replication. You might need to drop and re-create subscriptions/publications. It'll be one or the other, most likely.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: 2 sep. queries are fast except when executed together via UNION ALL

    Look at the different execution plans and see what the difference is.

    You might end up having to insert into a temp table and then select from that, but most likely...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Automated Driving

    CirquedeSQLeil (11/22/2010)


    Great Idea - not sure it is feasible. Issues are a plenty with something like this - virus in the system, hackers, bugs, system outages (during peak commute...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Assign a transaction number to separate instances of daily employee sign-in/sign-out transacations.

    You can partition it based on employee ID and on the date, then order by the time.

    Something like this:

    -- Test Data: Ignore this and use your table

    CREATE TABLE #T (

    ID...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Pass DB name as parameter to a SQL statement

    What you're asking about is called "dynamic SQL".

    You'll need to build the query as a string, and then use sp_executesql or exec() to run it.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Identity messed up on merge replication

    That's why GUIDs are recommended for merge replication.

    "Not for replication" will allow replicated rows to be inserted into an identity column, much the same as "set identity_insert on" will. ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 5,926 through 5,940 (of 14,953 total)