Forum Replies Created

Viewing 15 posts - 13,126 through 13,140 (of 13,445 total)

  • RE: developing Import export utility

    your program would simply call the TSQL commands for backup and restore via TSQL;

    Get the list of databases that could be backed up:

    SELECT * FROM master.dbo.sysdatabases; that has the name...

  • RE: Extracting a specific word???

    here's a little bit of help. since you cannot determine whether a cityname has 1,2, or more words, i can't see of any way to not do at least a...

  • RE: Password reset for more than 100 users

    --in Theory, this would generate thecode to reset all SQL Logins to a default password

    declare

    @isql varchar(2000),

    @username varchar(64),

    @newpassword varchar(20)

    set @newpassword='dataaccess'

    declare c1 cursor for select name from sysusers

      where uid >...

  • RE: How to list allcolumn names and their data types from a view?

    you might also want to look at some of the built in views;INFORMATION_SCHEMA has a lot of nice data.

    in my database, all my views start with VW_; change your WHERE...

  • RE: Cursor or not

    unless you need to handle the @@IDENTITY /SCOPE_IDENTITY() to insert into child records after you insert into a parent table, there's no real need to use the cursor in your...

  • RE: Table names involved in a CONSTRAINT

    here's a version that i use; it includes the alter table add constraint format as well, in case you were readding them to your database or whatever.

    select

    sysobjects.name as fkname1,...

  • RE: OPEN XML - what is the diff betn Element centric and attribute centric

    here's a lame example of both to help you visualize.

    element centric:

    <ROOT>

     <BOOK>

      <TITLE>The Best of SQLServerCentral.com - Vol. 3</TITLE>

      <AUTHOR>Brian Knight</AUTHOR>

      <NUMBEROFPAGES>250</NUMBEROFPAGES>

     </BOOK>

    </ROOT>

    Attribute centric:

    <ROOT>

     <BOOK TITLE="The Best of SQLServerCentral.com - Vol. 3" AUTHOR="Brian Knight" NUMBEROFPAGES="250" />

    </ROOT>

  • RE: Date field comparision - without time running slow

    i think you might be getting hung up on formatting...

    remember the date is actually stored as a double,where the integer portion is days and the decimal portion it part of a...

  • RE: Date field comparision - without time running slow

    create an index on the column and see how that affects the speed:

    CREATE INDEX IX_ActivityDate  on C_Tracked_Item_Hist(ActivityDate);

    also throw away all your converts...

    Select * from table where activitydate > DATEADD(day,...

  • RE: Question about MSDE

    i think you are confusing the versions a little bit.

    if you have a non server operating system, your SQL 2000 instance IS a MSDE instance...if you had either the SQL2000...

  • RE: Export to Excel

    copy and paste it from a raw text editor...word might reformat it to a microsoft format.

    copying that as text, naming it test.xls and then opening it in excel and you'll...

  • RE: Export to Excel

    if you create an html document and give it the .xls extension, then when excel opens it, it will maintain the format...so if you make a <TD BGCOLOR="#EEEEEE"><B>COLUMN NAME</B></TD>

    the cell...

  • RE: strip HTML tages

    it's godawful easy; download the source fromt eh web link i posted.

    copy the dll from the release folder to your c:\program files\microsoft sql server\$instancename\Binn directory.

    run the .SQL script that is...

  • RE: strip HTML tages

    as Vladan identified, malformed HTML will result in an unwanted result from regular expressions.

    here i used the extended stored proc i mentioned before:

     

    declare @string varchar(8000),@regExpr varchar(500)

    set @string='<OL>

    <LI>

    <DIV align=center>Store...

  • RE: strip HTML tages

    this is kind of hard to do; i use an extended stored procedure in order to strip RTF or HTML tags;

    see this post for the details, other examples, etc:

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=150&messageid=242853#bm243180

     

Viewing 15 posts - 13,126 through 13,140 (of 13,445 total)