Forum Replies Created

Viewing 14 posts - 1 through 14 (of 14 total)

  • RE: Need Query Help Urgent

    Then this will return only those students who had 5 AND 10 but not 15

    create table student ( stdnt_id int, stdnt_name varchar(50),stdnt_activity SMALLINT )

    go

    INSERT INTO student

    select 1, 'kiran', 5...

  • RE: Need Query Help Urgent

    create table student ( stdnt_id int, stdnt_name varchar(50),stdnt_activity SMALLINT )

    go

    INSERT INTO student

    select 1, 'kiran', 5 UNION ALL

    select 1 ,'kiran', 10 UNION ALL

    select 1 ,'kiran', 15 UNION ALL

    select 2...

  • RE: script to identify logins that utilize the 2005 password complexity

    if you comment out the following words at the last line, you will see some results.

    --and(log.name='My_login')

  • RE: Cannot execute system stored procedure sp_msforeachdb

    --create stored procedure sp_MSforeachdb

    /*

    * The following table definition will be created by SQLDMO at start of each connection.

    * We don't create it...

  • RE: Linked Servers

    Check this link, it is for SQL server 2000

    http://msdn.microsoft.com/en-us/library/cc296676(BTS.10).aspx

  • RE: Linked Servers

    Have you checked the msdn link below?

    http://msdn.microsoft.com/en-us/library/aa560998(BTS.10).aspx

  • RE: How to extract a values from the table

    You need to change: 'where places =' to 'where places in '

    See example code below

    --create table

    create table busroute

    (busno varchar(10),

    places varchar(500))

    --insert value

    insert into busroute

    select '12G', 'Kalaignar Nagar, Nesapaakam,...

  • RE: XML Workshop 26 – SELECT * FROM XML

    Excellent!

  • RE: T-SQL - some HELP

    --declare a table variable

    declare @intakesource_daily table

    (scheduledTime datetime)

    --insert a testing value

    insert into @intakesource_daily(scheduledTime)

    values ('2010-04-27 14:56:40.993')

    --if the scheduledtime < getdate(),then print 'file is late'

    IF EXISTS

    (SELECT...

  • RE: RAID

    totally agreed with sknox. 🙂

  • RE: Concatenating Rows

    create table #fruit

    (id int, name varchar(50))

    declare fruits cursor

    read_only

    for select distinct id from fruit

    declare @id int

    declare @value varchar(500)

    open fruits

    fetch next from fruits into @id

    while (@@fetch_status<>-1)

    begin

    if (@@fetch_status<>-2)

    begin

    select @value...

  • RE: Concatenating Rows

    select stuff((select ', '+ name from fruit

    order by ', ' +name

    for xml path ('')), 1, 2, '')

    --returns

    Apple, Banana, Grape, Melon, Orange

  • RE: Concatenating Rows

    select stuff((select ', '+ name from fruit

    order by ', ' +name

    for xml path ('')), 1, 2, '')

    --returns

    Apple, Banana, Grape, Melon, Orange

  • RE: Question of the Day for 27 Jul 2004

    Statement A:

    select myOrd.Order_No, myiT.Item_No, myOrd.Unique_ID as 'UniqueID'

    FROM myOrders myOrd

    JOIN myItems myiT

    ON myOrd.Order_No = myiT.Order_No

    Order BY myiT.Unique_ID desc

    Statement B:

    select myOrd.Order_No, myiT.Item_No, myOrd.Unique_ID as 'Unique_ID'

    FROM myOrders myOrd

    JOIN myItems myiT

    ON myOrd.Order_No = myiT.Order_No...

Viewing 14 posts - 1 through 14 (of 14 total)