Forum Replies Created

Viewing 15 posts - 1 through 15 (of 429 total)

  • RE: Select first (Minimum) avilable course

    Perfect.

    I have to admit I am stupid.

    Thanks a million.

  • RE: Can you solve this sort problem?

    Mark why is it the sub-set within that page you want to sort?

    Try any websites (ex. Shopping) when you sort it will sort the entire record and then page...

  • RE: Linked Server in SQL Server 2005

    Thank You.

    SK (1/3/2009)


    Can the user run the statement without going through the linked server? That will help rule out any issues with the linked server permissions.

    If not, I would...

  • RE: Linked Server in SQL Server 2005

    Thanks SK I can change the access rights temperarily to check. Any chnage on user rights would apply to all the objects. We don't want that.

    But I own only the...

  • RE: Linked Server in SQL Server 2005

    THank you for the replies.

    Linked server properties shows it is using lnkUsr with password. I gave

    GRANT ALL ON permanaentTable to LnkUsr.

    It did not work.

    I made the lnkUsr as sysadmin...

  • RE: Start of each new group

    bitbucket

    I am sorry if I did not express well.

    Each row key is a set of data. We get the same data almost every day. But there will be changes...

  • RE: Start of each new group

    Thanks bitbucket

    The results needed is exactly like SELECT * FROM @MyVersions WHERE RowKey IN (1, 4, 6, 7, 10, 13, 17, 20, 23)

    But we have to find (1, 4, 6,...

  • RE: ORDER BY items must appear in the select list if SELECT DISTINCT is specified.

    I would suggest to usp_ (user stored procedure) is you must use a prefix.

    This is what BOL says

    System Stored Procedures

    Many of your administrative activities in Microsoft® SQL Server™ 2000 are...

  • RE: SQL crosstab query for Differential dates

    No answers from any one. I did some how managed it. Please find faults or errors in this.

    DECLARE @CustomerComplaints TABLE

    (

    MachineID VARCHAR(32),

    Model VARCHAR(64),

    Complaints INT,

    DataDate DATETIME

    )

    INSERT @CustomerComplaints

    SELECT 'NotUpgraded', 'Model 2', 15, '2007-04-23'...

  • RE: ORDER BY items must appear in the select list if SELECT DISTINCT is specified.

    You beat me on that Gilamonster when I was typing the sample code.

    BTW.

    order by case when @sortorder = 1 then col1 else col3 end asc

    will throw error if...

  • RE: ORDER BY items must appear in the select list if SELECT DISTINCT is specified.

    I wouln't say this is efficient. But this is a way to do it.

    Such situation I always sort in the front end. If you are using ado.net it is...

  • RE: Dates Table in a DW

    Is it dates 01 to 07 are Week1 and 08 to 14 are Week2 like that. If yes then

    /* To produce sample data */

    SELECT IDENTITY(int, 1,1) AS ID_Num,

    myDate = CONVERT(DATETIME, '01/30/2007'),

    WeekInMonth...

  • RE: Dates Table in a DW

    can this help

    MSDN DATEPART function

  • RE: How to include this?

    Another way

    DECLARE @myTable TABLE

    (

    Student CHAR(5),

    [sequence] VARCHAR(3),

    GPA NUMERIC(5, 2)

    )

    INSERT @myTable

    SELECT 'ST1', '001', 45 UNION

    SELECT 'ST2', '001', 99 UNION

    SELECT 'ST2', '002', 23 UNION

    SELECT 'ST3', '002', 39

    SELECT COALESCE(A.Student, B.Student) Student,

    COALESCE(A.GPA, B.GPA)...

  • RE: How to include this?

    I am assuming several things here can you use MAX

    DECLARE @myTable TABLE

    (

    Student CHAR(5),

    [sequence] VARCHAR(3),

    GPA NUMERIC(5, 2)

    )

    INSERT @myTable

    SELECT 'ST1', '001', 45 UNION

    SELECT 'ST2', '001', 99 UNION

    SELECT 'ST2',...

Viewing 15 posts - 1 through 15 (of 429 total)