Forum Replies Created

Viewing 15 posts - 10,081 through 10,095 (of 13,461 total)

  • RE: users stored in database

    Thanks Gail!

  • RE: select comma Separated values

    here is a sql 2000 compatible example; this is updating a third column in the table to contain the concatenated values;

    you might be able to adapt this example to your...

  • RE: users stored in database

    you can use the old backwards compatible sysusers view or the newer sys.sysusers view in 2005 and above:

    select * from sysusers

    select * from sys.sysusers

    that is different fromt he logins that...

  • RE: Restrict Login to SSMS access to a database user

    Erik can you give a code example? I've recently found the IP address like this whenever i needed it:

    select client_net_address from sys.dm_exec_connections where session_id = @@spid,

    if there is another...

  • RE: Auto Increment within Select statement

    the row_number() function will do what you are after, as long as you are in SQL 2005 and above;

    something like this will work:

    SELECT COL1,COL2,COL3,COL4,ROW_NUMBER() OVER (PARTITION BY COL1,COL2,COL3 ORDER BY...

  • RE: loading data

    if a calculated column exists in the table, you MUST supply the column names.

    insert into mytable

    select 1,2,3,4 --will no longer work.

    you must say

    insert into mytable(col1,col2,col3,col4)

    select 1,2,3,4

    show us the...

  • RE: loading data

    you cannot include the computed column name in any insert/update/delete statement;

    so if you were doing something like

    INSERT INTO SOMETABLE(PK,Value,computedvalue)

    SELECT 1,3.1415,2*(3.1415)^2

    --it must be changed to

    INSERT INTO SOMETABLE(PK,Value)

    SELECT 1,3.1415

  • RE: Convert code from Implicit to Explicit

    here's my best guess; I had trouble identifying what is supposed to be the A alias, especially since it seems to appear twice.

    SELECT

    JOB.EMPLID,

    JOB.FILE_NBR,

    PER.NAME,

    ...

  • RE: SQL 2005 Role to see database objects?

    VIEW ANY DEFINITION would give them the ability to see proc code, but not edit it; here's some examples: you can also do it to a specific schema, so...

  • RE: Trigger not working as expected

    I'm a little weak on the UPDATE function, but i thought that if the column is included in the update statement, even if it is still the same value, the...

  • RE: Is there any justification for really using SQL CLR

    CLR is much faster with string manipulations. there are some things that cannot be done in TSQL

    Regular expressions is one of the most common example, where it cannot be done...

  • RE: Restrict Login to SSMS access to a database user

    gotcha...so you want to kill their connection if they use your the logon designated for your application and SQL Server Management Studio(or anything except your application:

    the if statement would look...

  • RE: Selecting records that match user-entered keywords

    you didn't quite post enough information...

    you said Say that the user enters 'a a m' as the search terms. Given the following two simplified tables, how do I select Michael...

  • RE: Restrict Login to SSMS access to a database user

    checkai (1/19/2010)


    We have user names for applications that have higher security than we want our developers to have. However, the developers need the pwd to put into their apps to...

  • RE: does a stored procedure recognize its 'caller'

    can you have each process add a variable to the procedure call? or at least one of them? they can discover which process from a parameter, but not really from...

Viewing 15 posts - 10,081 through 10,095 (of 13,461 total)