Forum Replies Created

Viewing 15 posts - 211 through 225 (of 898 total)

  • RE: Query Tuning

    This is a very vast topic and can't be covered in forum posts

    Do some search in Google and come back with specific doubts if any, we will be glad to...

  • RE: Creating views on multiple tables

    bilalhazrvi57 (5/31/2013)


    if i have 3 tables in my 2 different databases each having different number of columns, then I have to create 3 views to combine all of them???? or...

  • RE: Problem adding to a query

    I don't think there is any issue with the syntax. The error is probably due to something else.

    DECLARE @SPC varchar(6)

    SET @SPC = '{[Report]!B7}'

    SELECTsp.Item, sp.itemdescription, sp.SellingPrice, sp.EffDate, vp.PurchasePrice, sp.pricedesc,

    (

    SELECTMAX(ar.InvoiceDate)

    FROMtblarInvoice ar

    INNER JOIN...

  • RE: Create a Leveling of Intermediaries

    Can you also post the expected results based on this 8 sample rows?

    What is the Level you are expecting for each of these 8 rows.

  • RE: Creating views on multiple tables

    bilalhazrvi57 (5/31/2013)


    That is the error which i receives

    "All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.

    "

    Please check...

  • RE: Create a Leveling of Intermediaries

    Duplicate post. Please direct all your replies here.

    http://www.sqlservercentral.com/Forums/Topic1458521-391-1.aspx

  • RE: Create a Leveling of Intermediaries

    The explanation provided is not very clear and this is the reason why nobody has given an answer yet

    It would be helpful if you can provide some sample data and...

  • RE: Creating views on multiple tables

    bilalhazrvi57 (5/31/2013)


    hi,

    yes it works for one tables means it can access data from remote server and combine with currently logged server's table, but when i want to add two tables...

  • RE: Need some help

    m.rajesh.uk (5/30/2013)


    Hi friends,

    Recently i faced an interview... i need answers for questions which i am not comfortable in delivering.

    1. difference between SQL 2008 and 2008 R2

    2....

  • RE: Creating views on multiple tables

    bilalhazrvi57 (5/30/2013)


    Hi Bills,

    Thanks a lot for your kind suggestions. Look you told me to do this, that one table from server1 union with one table from server 2. It works...

  • RE: The best method for reading books

    I hate reading e-books, but that is what I do the most.

    Whenever I get some issues, I do a look-up in the internet or in some e-book which I have.

    Additionally...

  • RE: Displaying a week numbers as a rows for given date range

    You can use it to JOIN with other tables as well

    DECLARE@start_date DATETIME, @end_date DATETIME

    DECLARE@table TABLE

    (

    eventNumINT,

    startDateDATETIME,

    endDateDATETIME

    )

    SELECT@start_date = '20130103', @end_date = '20130123'

    INSERT@table

    SELECT1, '20130105', '20130110' UNION ALL

    SELECT2, '20130117', '20130122' UNION ALL

    SELECT3, '20130108', '20130119'

    SELECTD.week_nbr,...

  • RE: Indexed view

    When a unique clustered index is created on a view, the result set is stored in the database just like a table with a clustered index is stored.

    You can check...

  • RE: Displaying a week numbers as a rows for given date range

    phoenix_ (5/29/2013)


    In the meantime I created something like this...

    declare @StartDate date

    set @StartDate = '2013-01-03'

    declare @EndDate date

    set @EndDate = '2013-02-21'

    declare @DateCalc date

    declare @WeekStartDate date

    set...

  • RE: Displaying a week numbers as a rows for given date range

    DECLARE@start_date DATE, @end_date DATE

    SELECT@start_date = '20130103', @end_date = '20130123'

    SELECTDATEPART(WEEK,Dates.Dt) AS week_nbr, MIN(Dates.Dt) AS start_date, MAX(Dates.Dt) AS end_date

    FROM(

    SELECTDATEADD(DAY,sv.number,@start_date) AS Dt

    FROMmaster.dbo.spt_values AS sv -- You can use TALLY table instead of this

    WHEREsv.type...

Viewing 15 posts - 211 through 225 (of 898 total)