Forum Replies Created

Viewing 15 posts - 16 through 30 (of 1,109 total)

  • RE: problem in query

    Assuming the two tables are tableA and tableB you can do:

    SELECT name

    , course

    , NULL AS course1

    FROM ...

  • RE: Remove tabs

    jabba (9/11/2008)


    Is it possible to remove tabs from a varchar field in sql server ?

    You can use the REPLACE function with the CHAR function. CHAR(9) is the tab character.

    An example:

    SELECT...

  • RE: Covering Index Vs Composite Index

    Could you include you query? Is this the only query that will be executed or are there other queries?

    - Andras

  • RE: Assigning Tables to a particular SCHEMA

    You could generate the script that moves the tables to a different schema (i.e. generate a script full of "ALTER SCHEMA newschema TRANSFER dbo.oneOfteTables" lines)

    Ideally you create one migration...

  • RE: Datetime question: empty vs NULL

    FreeHansje (9/10/2008)


    I wonder about the following:

    I'm reviewing a database and notice all table-attributes are NULLable, which is not best practice IMO. When checking potential problems when making the attributes not...

  • RE: Make databasename / schema a variable in select statement

    You can do this with dynamic SQL like:

    DECLARE @query VARCHAR(MAX)

    DECLARE @CONNECTION VARCHAR(50)

    SELECT @CONNECTION = 'SOMEDATABASE'

    SET @query = 'SELECT * FROM ' + @CONNECTION + '.dbo.SOMETABLE'

    EXEC( @query)

    another alternative is to...

  • RE: How to use column name inlike clause in SQL server

    Have a look at the line that you have higlighted:

    (Positions.Ticker Or (Positions.Cusip=qryPNLByFund.Ticker) Or

    You try to OR together Positions.Ticker with a logical expression, however, I suspect that Positions.Ticker is not...

  • RE: Retriving A single value from a commaseperated field

    Are these tables tables that you are stuck with, or did you create them yourself? In the first case, you would need to split the list into individual values. You...

  • RE: How to use column name inlike clause in SQL server

    Is this a condition for a select statement? If so, you can get rid of the case statement, and have something like:

    WHERE Positions.Ticker <> ''

    ...

  • RE: ON DELETE CASCADE syntax

    khushbu.kumar (8/22/2008)


    I want to alter table so as to make all the FK ON cascade delete.

    the tables are already made.

    I need syntax just to alter the constraint and...

  • RE: Auditing Sql Server 2005 - Capturing DML Statements

    Amit Khanna (8/22/2008)


    Hi Dr. Andras,

    Is there any freeware tool that read the transaction log out of those that you are mentioned ?

    Thanks,

    Amit Khanna

    I'm not aware of one for SQL Server...

  • RE: Auditing Sql Server 2005 - Capturing DML Statements

    Amit Khanna (8/21/2008)


    Hi All,

    Please give some information about how to audit all DML Operations performed

    on the Database.

    All Inputs are welcome !!

    Thanks,

    Amit Khanna

    You have several choices, depending on what you want...

  • RE: how to select middle row in table

    khushbu.kumar (8/21/2008)


    no ordering

    and i just need to display 4 row.. not the other row

    if there is no ordering, then there is no guarantee that the next time you execute...

  • RE: PROD data --> DEV environment

    There are third party tools that can both do the synchronization and validate the synchronization if you have done it yourself. One such tool is from a company I'm working...

  • RE: how to select middle row in table

    khushbu.kumar (8/21/2008)


    I want to select n row from a table

    where n can be any number...

    say in a table there are 100 rows , now i want to see only 10...

Viewing 15 posts - 16 through 30 (of 1,109 total)