Forum Replies Created

Viewing 15 posts - 286 through 300 (of 1,346 total)

  • RE: COMPUTE results to variables?

    No,

    a second query is in order

    alter PROCEDURE TestProc

    @SumTotal money OUTPUT,

    @AvgTotal money OUTPUT

    AS

    SET NOCOUNT ON

    SELECT @SumTotal = Sum(LineTotal), @AvgTotal = Avg(LineTotal)

    FROM Sales.SalesOrderDetail

    SELECT SalesOrderID, LineTotal

    FROM Sales.SalesOrderDetail

  • RE: Report Layout

    What control are you using? the Table control?

    on each cell on the table control you can select the Cangrow Property and set it to false.

    That will maintain the layout...

  • RE: GRANT SELECT permission from one user's tables/views to another

    Just because he has been given grant permissions does not mean he does not have to specify the table owner.

    Its all part of the security chain.

    UserA and UserB can both...

  • RE: SET dateTime variable to '' question

    a little odd, but since you declared your variable a datetime, and initialized it by setting it to '' it looks like sql server set it to 0, or the...

  • RE: Windows Authentication Failing

    You probly figured this out already,

    but when you get that error it usually means your account got locked, but your security token is out of sinc.

    Log off your machine,...

  • RE: ambiguous column name problem

    No, you can alias your columns.

    So where you know the column names returned are the same in each table you can us the as to alias the column

    I know your...

  • RE: lock database for access

    Ravi Patel (11/29/2007)


    So lets say, someone is running a query and I am about to rename the table...what would happen here? The query is still not finished and its...

  • RE: how to obtain next unsued value

    Sure,

    But your logic makes no sense, Do you need to return the Number RangeID, or just the next number??

    create Proc ReturnNumber @CurrentNumber bigint output

    as

    -- Get the current number

    select @CurrentNumber...

  • RE: Need help with query

    That does not make sense.

    What do you mean

    Table01 all fields having Account index.

    Take what I gave you and keep it going you have to use table aliases to keep...

  • RE: Foreign Key help!!

    Cannot read your code to figure out what your executing

    Try printing the @sqql variable to see what is actually being executed.

    Print @sqql

    EXEC sp_executesql @sqql

    take the data that is returned to...

  • RE: how to obtain next unsued value

    -- By first ID

    select *

    from number_ranges

    where id = (select min(id)

    from number_ranges

    ...

  • RE: GRANT SELECT permission from one user's tables/views to another

    The following script will kick out a row for each table.

    Set your query window to Results to Text, Execute this script

    Copy results to clipboard,

    then paste them into a new...

  • RE: Need help with query

    To link tables together in a query is called a join.

    By the table definitions you have provided, it is not clear what field in table01 is the account index as...

  • RE: lock database for access

    What is the reason you need to drop the table?

    By dropping the table you will be unable to hold any locks against it.

    By default sql will lock the table if...

  • RE: Need help splitting a column

    You can use charindex, or patindex along with substring

    declare @Temptable table (pk int identity, Name varchar(50))

    insert into @Temptable (Name)

    select 'Doe, John' union

    select 'Doe, Jane' union

    select 'Dirt, Joe' union

    select 'Cartoon, Joe'

    select...

Viewing 15 posts - 286 through 300 (of 1,346 total)