Forum Replies Created

Viewing 15 posts - 7,501 through 7,515 (of 13,460 total)

  • RE: T-SQL help

    you can do it with a subselect of something featuring row_number(), or simply with a GROUP BY:

    With MySampleData ([Record#],ManagerID)

    AS

    (

    SELECT 370868,1427894 UNION ALL

    SELECT 274658,1428292 UNION ALL

    SELECT 274658,1428293 UNION ALL

    SELECT 349883,1430095 UNION...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to manage databases without sysadmin role?

    i'm very weak on the reason why i had to do that trustowrthy thing;

    can you turn off trustowrthy, change the proc to WITH EXECUTE AS SELF, and...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Read Access to All Databases on server

    Tom Van Harpen (5/26/2011)


    this is the command I was playing around with:

    EXECUTE master.sys.sp_MSforeachdb 'USE [?]; exec sp_addrolemember ''db_datareader'',''Domain\MyNTGroup'' '

    Tom the way i've done it is like this: you'd just have...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: retrieve views containing reference to a specific column

    hxkresl (5/26/2011)


    Kindly show me the edit that would include stored procedures in the result set:unsure:

    it's right at the end: remove the last AND to see ALL dependancies, ro make it...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Read Access to All Databases on server

    not an easy way...

    every Login would need a user in each databaser, and each user would need to be added to a role that gives them read access and...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: retrieve views containing reference to a specific column

    glad I could help!

    Thansk for the feedback!

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: retrieve views containing reference to a specific column

    here you go...look at the WHERE statement at the end..specific column name, and must be a view...you can change that to fit your needs if needed:

    /*

    obj_nmcol_nmdep_obj_nmdep_obj_typedep_col_nm

    GMAACCPACTTBLKEYVW_GMBENEFViewNULL

    GMAACCPACTTBLKEYVW_CDBGACCOMPViewNULL

    */

    DECLARE @ColumnName VARCHAR(100)

    SET @ColumnName =...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Having Trouble...

    asm1212 (5/26/2011)


    Im not worried about the schema...The schema's are pretty much the same on both servers...there is just dummy data in test and he wants the real data from...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Having Trouble...

    asm1212 (5/26/2011)


    I have done that however, he doesnt want to copy over the sp's and other objects, he just wants the data...also our backups are only on tape...

    sounds like the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: To increase value from Engg0 to Engg1, Engg2, and so On!!!

    Gopal Singh (5/26/2011)


    Hello,

    When I create table as per code data is inserted in first successfully as ENG_REF value Engg0000000000 but when i insert in second row it showing an error...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: To increase value from Engg0 to Engg1, Engg2, and so On!!!

    Gopal Singh (5/26/2011)


    but i need this value can gone upto 4-5 million times, so can take datatype varchar(50) to varchar(max), then might it will allow me to enter increased the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: To increase value from Engg0 to Engg1, Engg2, and so On!!!

    based on what David showed, i'd just make the column calculated based on the identity instead of using a trigger:

    I don't know if you want preceedig zeros, or if Engg4592...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Function for getting date

    kr.nithin (5/26/2011)


    Hi,

    I have an issue . The issue is that I need to retrieve data such that Travel Date should be greater than the current date. But my problem is...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: My intellisense is not working

    sqlzealot-81 (5/26/2011)


    Not many organizations support picassa...Sorry...

    blocked at my job too....

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: My intellisense is not working

    Sumanta Roy (5/26/2011)


    Please restart your sql server and check if it works.

    uhh..no.

    intellisense as well as syntax highlighting are contained in a DLL called from the client app of...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 7,501 through 7,515 (of 13,460 total)