Forum Replies Created

Viewing 15 posts - 8,461 through 8,475 (of 13,460 total)

  • RE: 2 SELECT statements from one CTE

    a CTE is available just for the next statement in the query, so if it really needed to exist twice, you'll need a temp table.

    You're not really doing anything that...

    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 average a date column?

    rather than the AVG, i think you want the MIN([Sch Start]) for the earliest, or the MAX(([Sch Start]) for the latest date.

    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 Copy the Client Database

    since you have a VPN, your machine is effectively on their network right?

    what you'll want to do is fairly straightforward, the process is the same as you would do locally.

    connect...

    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: Using functions on remote/Linked server

    --snip edited wrong answer!--

    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: Need expression in column alias

    Joe you cannot make the aliases for the columns dynamically(at least not directly) , so you have to revert to dynamic SQL to do it instead...building the command, then executing...

    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: SQL Server 2005 Express (Adv Series) Installation problems

    this happened to me as well; a partial install kept me from redoing or uninstalling.

    i googled "completely uninstall sql2005" and found this link at microsoft that gave the annoying...

    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: Larger Default Trace

    Jack Corbett (10/28/2010)


    I'll take it. Shouldn't take long to put it together. Probably be a combo of Profiler & T-SQL

    Jack I've got a minor article i contributed that...

    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: A little Help

    it's in the comments of hte proc:

    --#############################################################################

    --if you are going to put this in MASTER, and want it to be able to query

    --each database's sys.indexes, you MUST mark...

    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: Table Value Function

    as usual, it depends....

    an inline table value function should perform the same...a multi statement TVF often slows things down...

    care tou show us the function to see if we can...

    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: Hashing data in existing schema

    anish, it looks to me like you are truncating your value by at least a couple of characters..., so you would never be able to compare a hash to 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: Trace Faling sp_executesql

    boris with Profiler running agaisnt my 2008 machine, i'm running this command as a crappy example into a table, which i know will produce a pk violation:

    CREATE TABLE [dbo].[MYADDRESS] (...

    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: Renameing a column in all tables in a sql 2008 database

    RENAME is a valid command in Oracle, but not SQL; you have to use the sp_rename procedure in this case.

    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: Which table is used last

    parthi-1705 (10/27/2010)


    Any other 3rd party tool can solve this.

    Trigger or not good to used on all the tables in the DB

    Server side trace may be good for one point 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!

  • RE: Hard coding leading zeros to Unique IDs

    mashikoo (10/27/2010)


    Hi Lowell,

    That's exactly what I'm trying to do add a calculated column to create the desired version and leave the original integer data untouched but i don't to Alter...

    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: Hard coding leading zeros to Unique IDs

    you can add a calculated column to create the desired version and leave the original integer data untouched; you can do the same in the presentation layer as well.

    ie

    ALTER TABLE...

    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 - 8,461 through 8,475 (of 13,460 total)