Forum Replies Created

Viewing 15 posts - 14,191 through 14,205 (of 14,953 total)

  • RE: Stored procedure returns -1 instead of 1 when true

    It sounds to me like there's a problem with the C# code that's being used. In a bit/bool data type, -1 = 1 = True, 0 = False.

    I have...

    - 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: Table vs View

    On updating the underlying tables via a view, the answer is "it depends". Some views, yes, some views, no.

    The rules on this are detailed in Books Online.

    - 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: Help SELECT getdate() always returns a date in yyyy-mm-dd format!!!

    My server is running on US_English, but this worked:

    set language british

    create table #DateTest (

    Date datetime)

    insert into #datetest

    select '30/06/1980'

    select *

    from #datetest

    Without the set language command, the rest of the code generates...

    - 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 agent question

    I have to say that the question and answer seem good to me. I would never have thought of even trying to do this (find out if SQL Server...

    - 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: Table vs View

    My first SQL database had 20 or 30 tables, 1 stored procedure, and 50 or 60 views. Some of the views went at least 5 levels deep before they...

    - 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: using database tuning advisor

    How big are the tables? Millions of rows?

    Creating statistics on a table is usually automatic. You might want to check the table properties on that regard. You...

    - 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: Databases on one server....

    On the triggers, yes.

    Most of the time, but not always, a reporting database can be loaded periodically from the OLTP database. That means, instead of every update happening in...

    - 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: Username and Password Issues with SQL Server 2005

    I don't know about the invalid keyword thing.

    Visual Web Developer comes with SQL Express. You'll need to download SQL Express Management Studio from microsoft. http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en

    Once you've downloaded and installed...

    - 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: Function Recursive

    You can have recursive triggers (which are usually a problem, but can be done if needed) in SQL Server.

    You can have recursive procs in both 2000 and 2005 (might be...

    - 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: Storing User Generated Queries

    Query text can pretty easily be stored as varchar(max) in a table. Perhaps with a user ID column and a last-used datetime.

    - 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: Recursive Query

    Dictionary definition of "Recursive":

    Recursive (re-cur-siv) adj: See recursive.

    - 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: Default Value or Binding

    If you can't normalize it, and can't modify the code, because the system is in production, then even if you could add a default constraint to the table to handle...

    - 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: Updating all stored procedures within a database

    select name, definition

    from sys.sql_modules modules

    inner join sys.all_objects objects

    on modules.object_id = objects.object_id

    where definition like '%' + YourObjectName + '%'

    Replace "YourObjectName" with the name of your function, or with a variable, and...

    - 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: How this query was executed?

    I'd replace the whole thing with 2 "exists" queries.

    where exists

    (select 1

    from table1

    where exists

    (select 1

    from table2

    where id = table1.id))

    Of course, it'll need something in the outer query that ties table1 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: Default Value or Binding

    Are these two columns in a larger table that has more columns with other data, or is this a table with just these two columns and five rows?

    In the case...

    - 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 - 14,191 through 14,205 (of 14,953 total)