Forum Replies Created

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

  • RE: urgent plzzzz

    Hi - Post the actual table name and the actual column names in your "TableA".

    Then I can show you how to get eliminate the dupes in your big...

  • RE: urgent plzzzz


    You can eliminate duplicates in Table A with SQL statement:

    SELECT col1, col2, col3, col4, col5, col6, col7

    FROM TableA

    GROUP BY col1, col2, col3, col4, col5, col6, col7

    This will return all unique...

  • RE: Help with declare

    Hello SG,

    To correct your specific error: Must declare the scalar variable "@dbname",

    change your code as shown below.


    set @sql =

    'select p.sa_property_id, z.zipcode as sa_site_zip, z.state as sa_site_state, as...

  • RE: Outer Join Trouble

    Hello Steve Hirsch - I also traverse between DB worlds.  Here are SQL Server equivalents to your Oracle query; for this simple a query they work the same.

    SELECT a.field, b.field

    FROM table1...

  • RE: Outer Join Trouble


    Both the article and the comment by Lutz Albers were enlightening.

    When I ran into this problem, I would solve it like this:

    SELECT *

    FROM a


      (SELECT * FROM...

  • RE: Digging Into Access Performance

    Hmm.  The Join to Employee Territories is a red herring. You're only updating the Employee table:

    UPDATE dbo_Employees

    SET dbo_Employees.LastName = "Leverling2"

    WHERE EmployeeID=3;

    If you were trying to profile a joined update,...

  • RE: Get Away From Confusing Code

    I like the idea of using variables instead of the quotes.  But not the part about the ASCII characters.  The solution below works best for me:

    Declare @q char(1)

    Set @q =...

  • RE: Simplify the Creation of XML from SQL Server Data

    I agree - the article was great. 

    One link does work:

    Re: "The accompanying download includes the binary and configuration files necessary to experiment with shapes on your own." ...

  • RE: Question of the Day for 25 Aug 2005

    Try this:

    DECLARE @val CHAR(20), @v2 CHAR(40)

    select LEN(@val), LEN(@v2)

    SET @val = ' SSC is cool '

    SET @v2 = @val + @val

    select LEN(@val), LEN(@v2)

    And this, for a different, non-intuitive result:

    DECLARE @val nvarchar(20),...

  • RE: help needed on database design


    Using your table [TbTimes], you can run a CrossTab Query to get 1 line for each rider.

    Heading Line: Rider Distance1 Distance2 ... etc, on colum for each distance

    Data line 1:...

  • RE: View the SQL query out-put in horizontal format.

    There are some critical differances between crosstab and rotate:

    A. Rows: Crosstab creates 1 row of output for 1 or more rows of input. 

    Rotate creates 1 row of output for...

  • RE: View the SQL query out-put in horizontal format.

    Hello Abrahim,

    This query has got to be for presentation (i.e. a report or a web screen), yes? If so, what's the target presentation app?   I'd try to do it there,...

  • RE: excluding fields in my SELECT from the GROUP BY clause

    Hello Luis Santos,

    I agree with Antares686, a sample output -- particularly of the two lines that you want consolidated into 1 -- would make this easier to solve.  However, I'll...

  • RE: real newie on derived columns

    Hello J M Davis,

    You can also tell SQL to calculate the derived column before the join, by putting the selections for table2 in a sub-select:




  • RE: Parsing the name field with T-SQL

    Hello cgrunner,

    The parsing-names problem has existed since names have been automated. I don't think it's susceptible to a technology quick-fix. Typical name data may include: honorific titles (DR., etc.), hyphenated...

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