Forum Replies Created

Viewing 15 posts - 901 through 915 (of 1,124 total)

  • RE: CTE Recursive Query

    Just add the ORDER BY clause to the CTE...

    With downline (ConsultantID,ConsultantName,SponsorID,SponsorName,DownLineLevel)

    AS

    (

    SELECT A.ConsultantID

    ,A.FirstName + ' ' + A.LastName as ConsultantName

    ,A.SponsorID

    ,(SELECT [FirstName] + ' ' + [LastName] FROM Consultant WHERE ConsultantID =...

  • RE: extracting data from two servers to make a report

    Desperate newbie (11/20/2007)


    thanks ramesh, but the problem is that the servers are different and hence i might have to provide DSN (opendatabaseconnection()) thats where the problem kicks in.

    You just need...

  • RE: Index on function Column

    Alen,

    Without changing the design, i don't think we can find ways to index that computed column.

    You can try the alternative approaches...

  • RE: Using fields as columns to display the data in a different format

    I guess its because of truncation (as there must be enough rows to fill the limit)...

    You need to modify the query...

    1. Need to select distinct dates from the resultset

    2. CAST(Quality_Date...

  • RE: Index on function Column

    Alen cappelletti (11/20/2007)


    I use this soluction for the function...

    SELECT

    MAX(IDconsel)

    FROM sqltest.ePrice2K5.dbo.Consel

    WHERE imp_fin <= @Prezzo AND tasso0 = @Tasso0

    I don't think this is going to work....

  • RE: avoiding to print nulls in select queries

    Then, just remove the TOP clause from the select statement...

  • RE: 1934 [Microsoft Jdbc Driver][Sql Server] Insert Failed...Arithabort

    Are you using Indexed Views or Indexed computed columns in your procedure? If yes, try setting the ARITHABORT option set to ON at procedure level.

  • RE: extracting data from two servers to make a report

    You first need to setup linked servers, and then access the linked server in the same fashion...

    SELECT * FROM ServerA.SomeDB.SomeOwner.SomeTable

  • RE: SQL Server Management Studio not installed

    I've been in the same situation when I first installed SQL 2005 EE. I've tried installing it multiple times but i failed to successfully install SSMS. After a...

  • RE: TSQL

    Just add one more column in your select.....

    SELECT 'Customer' AS Table, count(Customer_id) FROM Customer WHERE CountryCode='vn'

    UNION ALL

    SELECT 'SalesOp' AS Table, COUNT(salesOp_id) FROM SalesOp WHERE programCode='lt' and SalesOfficeCode like 'vn%'

  • RE: Index on function Column

    You can define indexes on computed columns as long as the following requirements are met:

    1. Ownership requirements

    2. Determinism requirements (which in your case is violated by using TOP)

    3. Precision...

  • RE: 1934 [Microsoft Jdbc Driver][Sql Server] Insert Failed...Arithabort

    What errors you are getting while executing?

    Is it overflow or divide by zero errors? If this is the case, then you need to check the settings of...

  • RE: SQL Server Management Studio not installed

    Excerpt taken for BOL:

    Microsoft Internet Explorer 6.0 SP1 or later is required for all installations of SQL Server 2005, as it is required for Microsoft Management Console (MMC) and HTML...

  • RE: avoiding to print nulls in select queries

    Could be elaborate on what exactly you want?

    I still couldn't get you what you are pointing to.:cool:

    Do you want only those rows where the said columns are not...

  • RE: Tables - Filegroups

    Here is the query, would give which indexes are stored on which filegroups...

    SELECTOBJECT_NAME( i.id ) AS TableName, i.name AS IndexName, fg.groupname AS [FileGroup]

    FROMsysindexes i

    INNER JOIN sysfilegroups fg ON i.groupid =...

Viewing 15 posts - 901 through 915 (of 1,124 total)