Forum Replies Created

Viewing 15 posts - 16 through 30 (of 47 total)

  • RE: selecting result of a dynamic sql statemnt into a variable

    DROP TABLE #temp

    DECLARE @university_id varchar(8),

    @college_id varchar(8),

    @department_id varchar(4),

    @status varchar(20),

    @high_mark int,

    @low_mark int,

    @exam_date datetime,

    @sqlselect1 varchar(1000),

    @Sqlselect2 varchar(1000),

    @id1 int,

    @id2 int

    SELECT IDENTITY (int,1,1) AS id1,a.university_id,a.college_id,a.department_id,a.exam_date, 'Status'=

    CASE WHEN electric_power >b.grade_level2 then 'pass'

    WHEN electric_power <b.grade_level1 then...

  • RE: selecting result of a dynamic sql statemnt into a variable

    yes ,I need to select the result(max(id)) into a variable. Also I have one more dynamic sql which returns onother value. So I am selecting these two results into...

  • RE: need help with this report

    yes, Its returning nothing.

  • RE: grouping and storing the data

    I am sorry for being not so clear with my requirement.

    Let me explain you in short and brief.

    I am grouping some of the colleges and assing them to group2 as...

  • RE: import db2 data into sql server

    what should be the data source when we import data from db2 using dts.

    thanks.

  • RE: sql reporting

    For each company we have 4 departments.

    Suppose for company 1 we have 2 departments and 2 and 3 and they have dept_no_count is 23 and 34 respectively.

    But in my report...

  • RE: splitting a sql string

    DECLARE @name varchar(500)

    DECLARE @len int,@start int,@start1 int,@len_original int

    SET @start1=0

    SET @name='aaa,bbb,ccc,ddd,eee,fff'

    SELECT @len_original=LEN(@name)

    SELECT @len=LEN(@name)

    SET @start=1

    WHILE @len>1

    BEGIN

    SELECT SUBSTRING(@name, 1, CHARINDEX(',', @name)-1 ) as user_name

    SELECT @start=CHARINDEX(',', @name)+1

    SELECT @start1=@start1+@start

    SELECT @name=SUBSTRING(@name,@start,(@len-@start))

    SELECT @len=@len-@start+1

    IF @start1=@len_original

    BEGIN

    SELECT @name AS...

  • RE: xml parsing

    Can anyone help me in this issue?

    Thanks.

  • RE: Table design

    Unfortunately the table cannot be normalised. all the columns should be in one table.So if the rowsize is greater than 8k is it going to affect the performance of my...

  • RE: Droping the Database in emergency mode

    I tried that also,But I have a connection which is an application user for that DB. So How can disconnect forcibly that user from th DB.I guess if i can...

  • RE: Droping the Database in emergency mode

    I'm sorry to say that now the DB is in emergency mode so i can't drop it.

    How can i drop when its in emergency mode.

    Thanks.

  • RE: Droping the Database in emergency mode

    Yep, I could not do it either.

  • RE: Droping the Database in emergency mode

    Yes,But it didn't work for me,So I have set the database to emergency mode.But how can i drop this database.I have created another DB with all the Data base objects...

  • RE: Suspect database

    update sysdatabases set status = 32768 where name = 'pubs'

     

    When i run the above command I got the following server message.

     

    Ad hoc updates to system catalogs are not enabled. The...

  • RE: Suspect database

     WHen i ran EXEC sp_resetstatus 'dbname' i got the below message.

    Prior to updating sysdatabases entry for database 'ihatespamdb', mode = 0 and status = 4194333 (status suspect_bit = 0).

    No row...

Viewing 15 posts - 16 through 30 (of 47 total)