Forum Replies Created

Viewing 15 posts - 691 through 705 (of 920 total)

  • RE: @@rowcount Returns 0

    Just a guess.  @@rowcount is returning the rowcount from the current context (in this case, the trigger).

    How about using

    IF (select count(*) from INSERTED) = 0

     

    instead?

  • RE: Is there a way to use sp_autostats databasename..tablename

    How about

    EXEC databasename.dbo.sp_autostats tablename

     

  • RE: Export a SELECT as an ASCII file

    You might want to try the "-W" option.  From BOL:

     

    -W

    This option removes trailing spaces from a column. Use this option along with the -s option when preparing data that...

  • RE: case when problem in query

    This doesn't match the syntax from BOL, for example:

     CASE ProductLine

             WHEN 'R' THEN 'Road'

             WHEN 'M' THEN 'Mountain'

             WHEN 'T' THEN 'Touring'

             WHEN 'S' THEN 'Other sale items'

             ELSE 'Not...

  • RE: counting rows in a table

    Sysindexes contains an approximate row count and is accurate right after statistics are updated.  If you need to know EXACTLY how many rows are in a table count() is the...

  • RE: CANNOT SAVE VIEW

    I don't knowif this is related, but I've seen this happen if the session that creates the view doesn't have the correct setting for the ansi_nulls and ansi_warnings set before...

  • RE: Temp table in a stored proc

    I'd try this first:

     

    Select the input parameters

    SELECT @DefaultDate, @EmpId,@CusId,@hiDay, @loDay

    so you can ensure they're being passed correctly.

    Take the single quotes off the 0 in the @loDay definition

    Take the # off the...

  • RE: Execute SQL Task Insert with parameter

    What error are you getting?

    You're missing a single quote at the end of 'MY Job'.

  • RE: Databases

    I've always used 2 types of criteria to decide what data goes where.

    Logical:  Is this data related to the other data by application or business function?  Is this data logically...

  • RE: Need advise on becoming a DBA

    I don't know what classes you've had, but I'd also recommend some foundational knowledge on the relational model.  Chris Date's books are, IMHO, the de facto standard basic text.  While...

  • RE: Is there a good way to understand the sysdatabases STATUS fields?

    From the MSDN site:

    status

    int

    Status bits, some of which can be set by using ALTER DATABASE as noted:

    1 = autoclose (ALTER DATABASE)

    4 = select into/bulkcopy (ALTER DATABASE using...

  • RE: Equivalent of Oracle Merge statement

    That's so cool!  But I'm having trouble finding this documented anywhere and when I run the following:

     

    drop

    table #mytable

    go

    drop

  • RE: TSQL table row counts don''''t match EM row counts

    They're not the same because EM uses the rowcounts in sysindexes ( or the Information_Schema equivalent) to give you an APPROXIMATE row count, while count(*) actually counts the rows.  Updating...

  • RE: stored procedure

    Hmmmm. The requirements seem a little vague.  I'll make the assumption that this XML stream, or the XML stream it describes, should be an input argument into a stored procedure.  What...

  • RE: Server CAL question

    My understanding is that you'd need 15 CALs (one for everyone who could hit the server).

     

Viewing 15 posts - 691 through 705 (of 920 total)