Forum Replies Created

Viewing 15 posts - 211 through 225 (of 245 total)

  • RE: Insert without column name listing

    select * into #temp from Employees

    alter table #temp drop column EmployeeID

     

    insert into Employees

    select * from #temp

     

    I havnt tested and it is may need to be addapted but with a...

    www.sql-library.com[/url]

  • RE: CREATE VIEW for sensitive info

    ah nope i dont think so.

    I dont think what you are asking for can be.

    Perhaps the only way to do it would be to prepopulate another table, maybe re-populating...

    www.sql-library.com[/url]

  • RE: CREATE VIEW for sensitive info

    trying putting 'execute as' into the view definition put it as dbo of whatever the production table needs. And then just grant access rights on view to your test users.

    www.sql-library.com[/url]

  • RE: Updating many rows into single cell

    I certainly wouldn’t recommend storing the data in this format, as you correctly point out it isn’t even in 1st normal form.(3rd is the minimum i would recommend). However i...

    www.sql-library.com[/url]

  • RE: SQL SERVER ADMINISTRATION

    bmail is also a very good tool

    http://www.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm

    use xp_cmdshell to call the tiny exe. As above put it in as a step only reached if the job fails.

    www.sql-library.com[/url]

  • RE: N-Many Relationship

    i am with you brother. My current inherited db puts data in generic tables. For example a 'persons' table contains customers, agents, account mangers, sales men all in recursive hierarchrys...

    www.sql-library.com[/url]

  • RE: Updating many rows into single cell

    super

    www.sql-library.com[/url]

  • RE: how can i avoid cursor here??

    yep what PW said

    www.sql-library.com[/url]

  • RE: how can i avoid cursor here??

    does it matter which account number you choose if there are two assosiated with a give da_id. if not max(or min) will get you one.

    select max(account_np), da_id from table group...

    www.sql-library.com[/url]

  • RE: Updating many rows into single cell

    You dont need to use a cursor here...

    This solution does rely on the data being ordered by category in the test table but you can always preorder it. This should...

    www.sql-library.com[/url]

  • RE: problem with temporary table.

    1. I am specifying "," as field terminator. How do I stop a column from splitting into 2 if there's comma there? like Spain, Mobile (should be 1 column, not...

    www.sql-library.com[/url]

  • RE: Help Please

    use select count(item)

    where datesold between getdate() and dateadd('ww',getdate(),-8)

    group by item

     

     

    www.sql-library.com[/url]

  • RE: problem with temporary table.

    I think the problem is using BCP and the second sp is a red herring. BCP opens a new connection which cant see temp tables on the sp which executes...

    www.sql-library.com[/url]

  • RE: How do select previous 18 months of data?

    select col

    from table

    where date between dateadd('mm',getdate(),-18) and dateadd('mm',getdate(),-1)

    www.sql-library.com[/url]

  • RE: How do select previous 18 months of data?

    select col

    from table

    where date between dateadd('mm',getdate(),1) and dateadd('mm',getdate(),18)

    www.sql-library.com[/url]

Viewing 15 posts - 211 through 225 (of 245 total)