Forum Replies Created

Viewing 15 posts - 316 through 330 (of 359 total)

  • RE: remove 'dead views'

    HI if your willing to share i would love a copy of the script you mention i have SQL2005 and 2008

    ***The first step is always the hardest *******

  • RE: Need to Transfer the data from a table from one instance to few other instances in a same domain

    are you just replacing the tables on the other databases? do you need to ensure that the primary key inseted into these new tables are the same? are the DB's...

    ***The first step is always the hardest *******

  • RE: remove 'dead views'

    not too sure what you mean, are you saying you have a view called dead object?

    ***The first step is always the hardest *******

  • RE: bcp tutorial or example

    you can also use SQL to create the BCP syntax for a batch file

    BCP IN

    select 'bcp %DATABASE%.dbo.'+name+' in "'+name+'.bcp" -E -n -T -S%SERVER%' from sysobjects (nolock)

    where name like 'table_name%'

    and...

    ***The first step is always the hardest *******

  • RE: query Optimization

    can you paste in your queires so we can take a look please

    ***The first step is always the hardest *******

  • RE: Advanced T-SQL Query

    instead of subqueries google temp tables, i prefer to create a temp table and then innner join instead of using subqueries

    however, it can depend on what you are trying to...

    ***The first step is always the hardest *******

  • RE: Advanced T-SQL Query

    Hi are you looking at sub queries? for example

    select col1,col2,col1

    from sometable

    where col1 in (select col1 from someother table

    ***The first step is always the hardest *******

  • RE: Select from 2 tables

    http://coolthingoftheday.blogspot.com/2010/09/if-i-had-to-draw-circles-to-visualize.html

    there you go all you need to know on joins 🙂

    ***The first step is always the hardest *******

  • RE: Select from 2 tables

    add in here some code to create some representative data or what data you want and i will pop you some SQL

    ***The first step is always the hardest *******

  • RE: Select from 2 tables

    as others say, you want to do a outer join perhaps like the below example

    you can find examples on books online, w3schools etc

    select column,column2,column3

    from tableA tblA(nolock)

    left outer join tableB tblB(nolock)...

    ***The first step is always the hardest *******

  • RE: How to do ?

    granted it may not be but by filterting down on the 2 collum you provide that bit of SQL will get out the top row of a returned set.

    can...

    ***The first step is always the hardest *******

  • RE: How to do ?

    select top 1 * from

    where column=

    and column=

    order by desc

    ***The first step is always the hardest *******

  • RE: cursor issue

    ys i agree 0 divided by null yeilds null, i had a simmilar issue with the same error and once i sorted out the null value the script worked fine

    ***The first step is always the hardest *******

  • RE: cursor issue

    That error sounds like somting your calculating has a null value so you need to find out what and eliminate the null.

    Do you have any representative data we can use...

    ***The first step is always the hardest *******

  • RE: How to find highest paying two employee for each dept

    Here is a start for you this will give you the highest paid per department

    select Emp_Name max(Salary)

    group by emp_name, Dept

    ***The first step is always the hardest *******

Viewing 15 posts - 316 through 330 (of 359 total)