Forum Replies Created

Viewing 15 posts - 12,406 through 12,420 (of 13,469 total)

  • RE: SQL Server 7, 2000 Administration

    you should script the deletes and truncates manually;

    when people say they want to delete the data, they are really saying just certain data...they typically don't want to dete teh data...

  • RE: SQL 2000 vs. 2005 T-SQL output results vary

    using SQL2000's QA to connect to botha SQL2000 and SQL 2005, i get the same results that your SQL 2000 did; no null row; i changed SET ANSI_NULLS on and...

  • RE: txt file importing

    ok i got a vb project to work based on your parameters...here's my question;

    in your example, the file had 5 columns. typically, BULK INSERT would expect 5 columns for all...

  • RE: Need help in adding Percentage column

    how about this?

    SELECT

    RegionDesc,

    MATotal,

    PartsTotal,

    DemandTotal,

    Total,

    (CASE WHEN ISNULL(Total,0.00) = 0 then 0

         ELSE  ISNULL(MATotal,0.00)    +

               ISNULL(PartsTotal,0.00) +

               ISNULL(DemandTotal,0.00)   / Total END) * 100 As Percentage

    FROM SOMETABLE

  • RE: Joining to a table with a comma delimited field

    look in the script contributions for the split() function.

    it takes a delimited list and turns it into a table, so your statement woudl simply change to this:

    "user_accounts INNER...

  • RE: RENAME OF USERS CHANGE OWNER SHIP

    here's the answer to both questions: change a login name:

    --Usage: EXEC pr_RenameLogin 'webdev', 'WebDeveloper'

    --modified from from http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=408&lngWId=5

    ---Code should be put in master database ---

    CREATE PROCEDURE...

  • RE: Help with a MAX score issue

    i think this is nothing more than adding a HAVING statement to the query you posted:you might need to select max(score), testcount as a separate subquery instead because of all...

  • RE: Securing a Payroll database on Public Server

    is a design change so that the fields are stored as encrypted data instead of plain text/numbers out of the question?

    I recently had to do that, redid the table so...

  • RE: Subscribe To Forum is VERY cool.

    got to any forum. Upper right corner has a link to click "Forum Options"

    first popup link says "Subscribe to Forum"

    next page allows you to change to get instant email notifications....

  • RE: QUERY TO ADD RECORDS TO A TABLE

    typically, to insert multiple rows, you use a select statement to insert the data.

    a simple example might be:

    INSERT INTO SOMETABLE(ID,NOTES)

    SELECT

    CustomerId,

    'This is a default note that...

  • RE: Backup Strategy

    sometimes it's easier to change something that exists, than to create something from scratch.

    I would suggest just creating a default maintenance plan using Enterprise Manager to make a backup plan and...

  • RE: Script to compare two tables

    Vladan's right, you MUST be able to identify what makes a row "unique"; it may be a combination of 5 fields, or it may be every field. that is the...

  • RE: Insert one row in one table and multiple rows on a second table inside transaction

    it sounds like you are entering some master...detail information into a pair of tables;

    As Vladan identified, you should be doing this as a couple of set based operations, instead of...

  • RE: Insert one row in one table and multiple rows on a second table inside transaction

    the more details you can provide, the better the answer.

    here's an example, but I'm not sure how helpful this will be:

    Create Procedure PR_Sample(@somedata varchar(30),@moredata varchar(30) )

    As

    Begin

    SET XACT_ABORT ON

    BEGIN TRAN  ...

  • RE: High sal from table

    you use a technique using the TOP statement twice:

    declare @payroll TABLE (

    salary money,

    firstname varchar(30) )

    INSERT INTO @payroll(salary,firstname)

    SELECT 400.01,'Bob' UNION

    SELECT 800.02,'Bill' UNION

    SELECT 1200.03,'Todd' UNION

    SELECT 100.01,'Nick'

    SELECT TOP 1 X.salary,X.firstname  FROM (

    SELECT TOP...

Viewing 15 posts - 12,406 through 12,420 (of 13,469 total)