Forum Replies Created

Viewing 14 posts - 211 through 224 (of 224 total)

  • RE: Missing OSQL/SQLCMD

    Since as you said it is clustered enviroment, are you trying to find the sqlcmd on the failover server.

  • RE: Deleting from a table with a hierarchyid

    You can use a deleted flag in the table, and mark it as deleted. Rather than physical deletion of the records rows can be soft deleted.

  • RE: How to view a tables relations.

    Create a database diagram, it will just show the relation of all the tables involved.

    Or else use the systables to find a particular relationship.

  • RE: Compare Columns in Same Table across two different Servers

    I have a suggestion, why are you checking the data types and colunmn names.

    Is it possible for you to drop and recreate the table instead on the destination server.

  • RE: create login

    Try this.

    create login ravid with password = 'ravid', DEFAULT_DATABASE = plu

  • RE: Sum of a column

    Hi,

    Sorry ignore this i got the question wrong.

  • RE: 2 tables (exactly the same) with 2 databases in different locations

    Please let me understand the following.

    From where you want to update. Online database to Local database.

    Why did not you want to use replication?

    Give us more scenarios...

  • RE: TSQL Help

    Hi,

    Hope this solves your problem.

    select sum(served)/COUNT(*),State,County,City,Lunch_Year from LUNCHES Group by State,County,City,Lunch_Year

    having COUNT(*) = 2 /* this can changed based on your requirement */

  • RE: Check and validate every value of a subquery

    Hi,

    Can you try this SQL.

    if Exists (select COUNT(*) from PROJECT Inner join SUBPROJECT ON PROJECT.ID = SUBPROJECT.ID

    Where (PROJECT.ID=@IDProject)

    and Subproject.StartDate is null) > 1

    BEGIN

    RAISERROR...

  • RE: TSQL Brain Teaser (for me at least)

    How about this sql.

    Create table Tbl_SQL_Test

    (

    PersonId Int,

    PesonName Varchar(20),

    GenderVarchar(10)

    )

    Insert into Tbl_SQL_Test

    select 1, 'babu','Male'

    union

    select 2,'Subu','male'

    union

    select 3,'jothi','female'

    union

    select 4,'srinithi','female'

    select A.PesonName,B.PesonName from Tbl_SQL_Test A cross join Tbl_SQL_Test B

    Where A.PesonName <>...

  • RE: TEMPDB issue.....

    You can use a Permenant temp table to insert all the (3 Lakh records) and see what is the space taken for the table.

    That gives an idea of what...

  • RE: Comma Separated Value (T-SQL Query)

    Plesae use this.

    SELECT name, ID, COUNT(*) as CNT

    FROM hp

    Group by name, ID

  • RE: Deadlock at primarykey column

    Update Trn_GJobDet set CompletedDate=getdate() , CompletedEmpId=4335

    Where QueueId < 2 and JobCardId=116111 and StageId=53 and

    SubJobId=971218 and CompletedDate is Null and IsActive=1

    If this table contains only 50 rows i...

  • RE: Discussion on Database Performance

    Use Truncate rather than delete.

    If you have Foreign key and the primary key the follow the below steps.

    Rename the table to old.

    Create a new table with the...

Viewing 14 posts - 211 through 224 (of 224 total)