Forum Replies Created

Viewing 15 posts - 76 through 90 (of 1,216 total)

  • RE: Selectecting records from the table falling in provided date range

    Hello,

    you will get much better response if you will post your questions with table definitions (CREATE TABLE ....) and sample data (INSERT INTO ...).

    If I understand correctly, what you need...

  • RE: stored procedure pro

    You could try this:

    SELECT *

    FROM sysobjects so

    JOIN syscomments sc ON sc.[id]=so.[id]

    WHERE so.type = 'P'

    and sc.text like '%INSERT INTO yourtable%'

    It isn't 100% reliable (you can miss some procedure because of split...

  • RE: DateTime Colunm and Indexes

    dave b (2/9/2009)


    where month([date]) = 1

    where [date] >= '20090101' and [date] < '20090201'

    As has already been explained, you get best results when working with values that are really present...

  • RE: SQL 2005 Query to get time difference between 1st row and 2nd row

    Hello,

    I think it is the other way round - you have to describe the logic, then we can look for solution. We don't know what you expect...

    How do you know...

  • RE: insert records into another table.

    sandy (2/2/2009)


    Hi Vladan,

    When i run this code is sql 2000 i get an error of

    Server: Msg 195, Level 15, State 10, Line 27

    'ROW_NUMBER' is not a recognized function name. but...

  • RE: Looping in select query

    Hello,

    Either post sample data (CREATE TABLE, INSERT INTO statements) and required result plus some more info about the "features", or look up ranking functions (e.g. ROW_NUMBER()) and CASE statement in...

  • RE: insert records into another table.

    Jeff Moden (1/31/2009)


    Vladan, check your code... I don't believe it's coming up with the correct result set.

    I checked it and either I'm blind (quite possible, I'm still only half awake)...

  • RE: insert records into another table.

    Ok, now it seems to be clear. Well, but it also seems that trigger will not work as you wish - trigger will fire on insert. If you have situations...

  • RE: insert records into another table.

    sandy (1/30/2009)

    i had prepared trigger on table TRAN_TABLE which is having column Tid and Tdatetime which will execute the stored procedure

    Better think again about that. Trigger that calls a...

  • RE: insert records into another table.

    Please show me why it won't work - find some example where my code produces an error and explain why that isn't correct. Also please explain a bit about the...

  • RE: insert records into another table.

    Hello,

    from your post I understood that if date changes, you start from the beginning - meaning that if transaction starts before midnight and ends on the next day, it should...

  • RE: Stored proc to count rows in a table based on a foreigh key different values

    dubem1 (1/28/2009)


    I have a "Table A" with a foreign key on a Status table. The Status table contains 6 differents status.

    I need a Stored proc which return how...

  • RE: problem with sizes

    When inserting strings, you have to handle their length.

    If you know that target column is VARCHAR(20), and the original text can sometimes be longer than that, then you have...

  • RE: How to link view and table together

    Garadin (1/7/2009)


    I'd personally store the time and then just drop it when needed in queries.

    Having too MUCH data is rarely a problem, too little data on the...

  • RE: Puzzling SELECT TOP/Group By issue

    Hmm... didn't you mention originally that you're writing it for SQLS 2000? This won't work on 2k, it uses feature introduced in SQLS 2005.

    In case you are writing it for...

Viewing 15 posts - 76 through 90 (of 1,216 total)