Forum Replies Created

Viewing 15 posts - 10,411 through 10,425 (of 15,381 total)

  • RE: SELECT TOP(100 PERCENT) in Derived Table

    As Michael said you need the TOP when using a derived table and an ORDER BY.

    What I don't understand is why there is a need to have an order by...

  • RE: Query Help

    yogi123 (10/10/2012)


    Sean Lange (10/10/2012)


    This looks a lot like homework. We don't typically provide answers for homework because we want you to learn.

    However, it seems you want the most recent date...

  • RE: Query Help

    This looks a lot like homework. We don't typically provide answers for homework because we want you to learn.

    However, it seems you want the most recent date prior to the...

  • RE: Antother Delete Duplicates Thread

    Here is an example of one way of deleting duplicates. There are plenty of other ways to do this.

    create table #Dupes

    (

    IdentityValue int identity not null,

    UserValue varchar(20),

    AnotherValue varchar(10)

    )

    insert #Dupes

    select 'asdf', 'Another'...

  • RE: Antother Delete Duplicates Thread

    Not 100% sure what you are trying to do here. It sounds like you want to delete duplicates from a table? This seems like an awfully complicated way to go...

  • RE: would need some help

    hillerz19 (10/10/2012)


    Hi Sean Lange,

    I am a new to SQL. And i try doing looking at a book but gives me error and lots of it. i am not sure how...

  • RE: would need some help

    This looks a LOT like homework. What have you tried? What do you think you need to change?

  • RE: CTE - Help with repeated data

    Without something to work with it is impossible to know what you are doing here. You said you have repeated data but there are no duplicate rows in your result...

  • RE: Char And int

    Eskandari (10/10/2012)


    Consider this Table :

    CREATE TABLE Test ( field_one nvarchar(10) );

    DECLARE @i int;

    WHILE @i<= 1000

    BEGIN

    ...

  • RE: I need to implement trigger on INSERTION and insert the same record to another table but avalue is showing null :(

    As Stewart said that will only work for single row updates but it also will fail if the table is empty. The values you are getting into your variables are...

  • RE: Counting distinct row numbers

    To get the count of cities for each state you need to remove City from the select list.

    SELECT [State]

    ,COUNT(DISTINCT[City]) AS City_Cnt

    FROM [dbo].[MySalesDataTableAggregatedMonthly]

    WHERE [State] IS NOT NULL AND [City] IS NOT...

  • RE: Deleting the tables which are not been used from long time.

    Be careful with approach. Deleting tables just because they haven't been used in a couple months can very likely come back to bite you. What about reports that are only...

  • RE: ?? on Current_timestamp update

    jbalbo (10/10/2012)


    Hi,

    I ran an update on one record to update the datetime using current_timestamp

    I might be losing it...

    but before the update when I looked at a date/time field its looked...

  • RE: To insert varchar records in datetime field

    sqlstud (10/10/2012)


    Hi,

    I have table "Trial1"

    One of the columns is

    DATERECEIVED DATETIME NULL

    Loading data from Excel to staging table using ssis 2005.

    Datareceived column contains data as below

    17/12/2010

    18/12/2011

    DECLINED

    NULL

    I need to load...

  • RE: use of distinct and group by.

    nitin.varshney (10/10/2012)


    actually there is no need to aggregate the some value. only need to identify the distinct records. which also can be possible using the group by clause. so i...

Viewing 15 posts - 10,411 through 10,425 (of 15,381 total)