Forum Replies Created

Viewing 15 posts - 10,306 through 10,320 (of 13,469 total)

  • RE: Giving backup & Restore access to user having read,write permission

    we have a third party database on our server, and if an issue is found in thier application, they often need a backup of the database to diagnose.

    I simply created...

  • RE: Synonym for Db

    nope, sorry; synonyms are for Objects...Tables, Views, Stored procedures, functions, etc.

    you can make a synonym for a table on db1.databasename.dbo.tablename, but not the server, database nor schema.

    you could use...

  • RE: Return Type in Stored Procedure

    it's his variables...he declared them up at the top, then lost the @ in the rest of the script:

    @STARTUP_TIME datetime OUTPUT,

    @SHUTDOWN_TIME datetime OUTPUT

    if he replaces his STARTUP_TIME with @STARTUP_TIME ,...

  • RE: Return Type in Stored Procedure

    I'd suggest trying to comment your code and use indenting to help you more easily identify syntax issues like this;

    i try to put a comment after every END so I...

  • RE: Error handling in 2K8

    this is how i thin k it needs to be written...somewhere near the end you are calling your audit proc, but not passing the values...i think that's the issue.

    also, your...

  • RE: Error handling in 2K8

    pretty sure the issue is that the error is raised BEFORE the procedure is executed.

    like you identified, when the compiler tries to send 'asbc' to an integer datatype, it raises...

  • RE: Stock Control in SQL Products Table

    bkirk (11/22/2009)


    So if i understand this correctly...

    Are you saying that your Products table does not actually need a column for Stock Count?

    yes that is exactly correct. the Products table...

  • RE: Stock Control in SQL Products Table

    don't know how others do it, but I've used an updatable view. the view is basically the main products table, which is joined to a group by/subquery of the "ProductReceived"...

  • RE: sql query question

    this is an excellent question that trips up a lot of people.

    try both of these queries and see the results should be different:

    select * from table a

    left outer join table...

  • RE: Rounding - Is there a better way

    MrT I'm not sure what the final objective is, but this is the first thing i thought of;

    DECLARE @VariableA DECIMAL(7,4)

    SELECT @VariableA = 7.0449

    SELECT CEILING(@VariableA * 100.0)/100.0

    SELECT @VariableA = 7.0001

    SELECT CEILING(@VariableA...

  • RE: Date and Time Issue in script - removing time and leaving date only

    the way i usually do it is like this, which keeps everything in the same datetime datatype with no conversions, and effectively strips/zeros the time portion:

    --Midnight for the Current Day

    select...

  • RE: Compare two tables ("AND")

    looks an awful lot like homework, so lets see what you've done so far;

    we need to help you learn the concepts, and not do the work for you.

    did you actually...

  • RE: String Parsing Hell

    i thought maybe using the PARSENAME function might get you to where you wanted...tis is still sorting as text, we could change that a bit, but i thought this was...

  • RE: Four-Part Name

    assuming your linked server was aliased as "MyOracle" this command should help:

    --list all the tables and their names

    EXEC sp_tables_ex MyOracle

    GO

    we have a "model" kind of schema withthe user "CHANGE_ME" as...

  • RE: T-SQL code to group data into comma delimited column

    ugg...i was pasting an example that uses the FOR XML to resolve this, and realized you posted in a SQL 2000 forum.

    the best way is to use the trick that...

Viewing 15 posts - 10,306 through 10,320 (of 13,469 total)