Forum Replies Created

Viewing 15 posts - 10,501 through 10,515 (of 13,469 total)

  • RE: Connditional executing of script

    if you need the actual count, instead of just checking for orders, try this way:

    declare @TheCount int

    select @TheCount = count(*) FROM [ReorderS] where Item is not null

    if @TheCount> 0

    ...

  • RE: db_owner script

    yes.

    as db_owner, you own every object in the database; you can read/write, as well as create/alter/drop all the objects...

    db_owner is a powerful role so it's like having db_datareader,db_datawriter and ddl_admin,...

  • RE: Is it true Tabled Value-function can not be used as WEBMETHOD such Scalar Valued-function?

    SQL Server's SOAP does not support table valued functions unfortunately. This is why it's not working. I found this out by talking to one of the testers. ...

  • RE: Update table owner (UID) error

    looks like you'll need to make a cursor, since the proc only changes one object at a time;

    at least with the cursor, you could call it with parameters for all...

  • RE: Update table owner (UID) error

    i think you'll need to use the stored procedure sp_changeobjectowner, which i think was around for SQl 2000 as well; that's the way to change the owner from say ,dbo,...

  • RE: Script Help

    it's one of those "GOTCHAS" with the left outer join;

    a left outer join should test for a column=null or not null on the joined table;

    if it tests for anything else...

  • RE: Interview Questions

    ask indirectly about whether they pony up money for conferences/networking events;

    ie: "Did your last admin go to the SQL PASS conference for your company?"

  • RE: Script Help

    ahh... the WHERE statements are turning the left outer join into an inner join.

    try this instead:

    SELECT DISTINCT NAME

    FROM APPLICATION_USER

    LEFT JOIN USER_PGM_AUTHORITY

    ON APPLICATION_USER.NAME = USER_PGM_AUTHORITY.USER_ID

    AND USER_PGM_AUTHORITY.PROGRAM_ID = 'VMINVENT'

    WHERE USER_PGM_AUTHORITY.PERMISSION...

  • RE: Script Help

    bpowers (9/21/2009)


    If a user has permission to a program there is not a null value. There is no placeholder whatsoever. So, I can not use "permission is null" in a...

  • RE: Script Help

    admin is on the right track;

    i think you might need to start with a base table of all users, then join it to this table to generate your list;

    something like:

    Select...

  • RE: create table, procedure, view on 2 or 3 databases when its created on one database

    OK, I don't think i would ever implement something "automatic" like this, because I strongly beleive that scripts have to be tested more than once to make sure they are...

  • RE: Connditional executing of script

    also note you cannot have a GO statement inside your IF statements BEGIN /END block...

    your example for part one would not be valid, it would have to be like this:

    IF...

  • RE: Linked Server - invalid object

    definitely a permissions issue;

    there's several ways to set up how to get to the view, and it depends on how it's set up.

    in my example below, because i decided...

  • RE: SQL Functions VS JOINS

    In my opinion, functions are OK if you are getting a single row of data. but if you are getting more than one row, a functions should be replaced with...

  • RE: Linked Server - invalid object

    does wrapping it in brackets help? plus it needs to be a 4 part name...server.database.owner.object:

    does this work:

    SELECT * FROM [VSMIADBGP01].[LPB_GreatPlainsUtils]..[vwADB_LPB_CONSOLIDATED_ACCOUNT_DIV_DEPT_BRANCH_YEAR_2009]

    --or

    SELECT * FROM [VSMIADBGP01].[LPB_GreatPlainsUtils].[dbo].[vwADB_LPB_CONSOLIDATED_ACCOUNT_DIV_DEPT_BRANCH_YEAR_2009]

Viewing 15 posts - 10,501 through 10,515 (of 13,469 total)