Forum Replies Created

Viewing 15 posts - 1,801 through 1,815 (of 2,452 total)

  • RE: Splitting a huge, a huge table in two or three

    sql-lover (8/18/2012)


    Hmmm...

    I am not working today, but several GBs ... over of 10 millions rows, off top of my head.

    I do not remember the numbers exactly, but it...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Splitting a huge, a huge table in two or three

    how big is "big" ??

    row numbers

    columns numbers

    file size

    index size

    ??

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Middle Number Needs GROUP BY

    SELECT Id, AVG(Amount)

    FROM #TempMid

    GROUP BY Id

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: sql query logics

    asranantha (8/16/2012)


    how can u gues it is interview question? and in case of its interview question why ur not help?ok if u know answer tell me answers its help other...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Inserting data in one table as selecting from other tables

    laurie-789651 (8/15/2012)


    I read it as: the book/page/entry data refers to the original hand-written books, and the data is just required to print on the certificate so it can be referred-back...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Inserting data in one table as selecting from other tables

    priest Ivan Delic (8/13/2012)


    Hi!

    I forgot one thing. In paper-data there is about 30 books with 100 pages in each of them. On each page there is 10 records, so 1,000...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Inserting data in one table as selecting from other tables

    I think I may now understand what you are trying to do....but there again I may well be completely wrong!

    You have a "printing application" that requires a table as its...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: how to write a select query by passing @cattyp as parameter for this tables and here i am trying for rand() in this select query ?

    possibly another way....assuming you want a random image returned.

    does this return what you want?

    declare @cattyp varchar(3)='cri'

    ;with cte as

    (

    SELECT alid ,

    imageid ,

    ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: SUM with condition in query

    rVadim (8/12/2012)


    J Livingston SQL (8/12/2012)


    try removing the GROUP BY

    The OP included Id in the list. So, i thought s/he wants totals by Id, not over all table. So, which is...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: compressing 3 distinct records to 1

    suggest you search this site for "concatenate rows", crosstabs / pivots

    one method that will do as you ask is by using "FOR XML PATH"

    here is an example

    with produce (id,fruit,...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: SUM with condition in query

    try removing the GROUP BY

    SELECT TotalCost = SUM( Cost ) ,

    Cost0 = SUM( CASE WHEN Code = 0 THEN Cost END )...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: how to write a select query by passing @cattyp as parameter for this tables and here i am trying for rand() in this select query ?

    sivag (8/11/2012)


    i just found the solution for this my friends no thanks

    Hello sivag

    would you care to share the solution you found please?

    This may well assist othesr in...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Inserting data in one table as selecting from other tables

    Hello

    could you please provide some sample data for each of your tables and also what results you are expecting, based on the sample data, once they are all put into...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: record count top 5 then other

    just an idea ...anywhere close to what you require?

    CREATE TABLE [dbo].[Table_1](

    [ID] [int] NULL,

    [Val] [varchar](1) NULL

    ) ON [PRIMARY]

    INSERT INTO [dbo].[Table_1]([ID], [Val])

    SELECT 1, N'A' UNION ALL

    SELECT 2, N'B' UNION ALL

    SELECT 3, N'C'...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Pivoting the table

    ashwinrao.k23 (8/10/2012)


    Here is the scenario please..

    For exmaple if i have the fields like below

    File Main ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 1,801 through 1,815 (of 2,452 total)