Forum Replies Created

Viewing 14 posts - 361 through 375 (of 375 total)

  • RE: Select Previous Qtr''''s data in January

    SELECT * FROM table1

    WHERE

    (DATEPART(quarter, @date) = 1 AND YEAR(table1_date) - 1 =  YEAR(@date) AND DATEPART(quarter, @date) = 4)

    OR

    DATEPART(quarter, @date) <> 1 AND YEAR(table1_date) =  YEAR(@date) AND DATEPART(quarter,...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Need help in writing a crosstabs T-SQL!

    You don't need the Location_1 in group by. Because it is the column name in your table this is screwing up your query

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: How to insert data in a table with Row_ID column?

    Why do you want to use DTS for this? Can you link the servers and the run an insert statement on the destination server. (I am assuming you have this...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: updating rows using cursor problem

    I think you should be able to get it done in just few minutes.

    The table create statement shouldn't take you more then a...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: updating rows using cursor problem

    What you may want to do is create a table myTable1 with identical structure as yours plus one additional field with IDENTITY attribute. Then simply insert into this table all...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: How to insert data in a table with Row_ID column?

    I said that it looks like the DTS does not provide the values for this column. In this case the default would work. If the NULL is forced down on...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Loop through each record and then each field within each record

    I don't understand this fascination with cursors. I have seen people using them in cases where a much simpler plain SQL code will do.

    If one has a proper database design there...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: How to insert data in a table with Row_ID column?

    Looks like your DTS is not providing the values for this column. What you can probably do (if you have the rights to) is to setup default on that column...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: MSDE Question

    Do you have a firewall on that box the MSDE sits on?

    I think you may need to open UDP 1434 to access the SQL Server via EM.

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Is there a better way to ignore time portion of a smalldatetime field

    Try this

    SELECT DATEADD(day, DATEDIFF(day, 0, getdate()), 0)

    You can make it into UDF

     

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Fixing SysDepends

    About the utility:

    Good idea, horrible implementation. Looks like early prototype not a beta version.

    Very disapointed. I used SQL Compare (GREAT TOOL) from the same company but this ulility looks like written...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Powerchute 6.x User''s Alert

    Unfortunatelly I have to disagree with your comments about APC being late warning their customers. They have been sending the warning emails for months now. I have received at least...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Ripping a date apart

    The problem of using CHAR type in this case is that then the concatenated string will look like this ( taking Everett's example):

    9 /13/2004 - note the space after 9

    And although the...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

  • RE: Ripping a date apart

    In my opinion using the DATEADD function is the cleanest way to achive what you need. You do not have to create a messy logic to deal with changing months...

    ---------------------------------------------
    [font="Verdana"]Nothing is impossible.
    It is just a matter of time and money.[/font]

Viewing 14 posts - 361 through 375 (of 375 total)