Forum Replies Created

Viewing 15 posts - 91 through 105 (of 182 total)

  • RE: sp_configure 'Allow updates', 1 DOES NOT WORK

    I know this is a little late, but thought I would post it in case someone else came across this post looking for answers...

    Matthew Mark (3/10/2008)


    I cannot update system catalogs.

    Okay,...

    If it was easy, everybody would be doing it!;)

  • RE: How to write a script to get the generated scripts of table definition

    In Enterprise Manager, you can generate a single script for ALL tables in the database (all in a single file).

    Highlight the DB name, rt click, select 'generate SQL script', click...

    If it was easy, everybody would be doing it!;)

  • RE: How to write a script to get the generated scripts of table definition

    I'm not sure if I follow you, but in Query Analyzer you can also right click the table name to generate the 'create' script for the table.

    Is this what you...

    If it was easy, everybody would be doing it!;)

  • RE: Concatenating string

    Yep, what Matt said. I posted a few seconds after he did, so I didn't see his post.

    This is what the link I sent earlier was explaining as well.

    This...

    If it was easy, everybody would be doing it!;)

  • RE: Concatenating string

    Ok, seems OPENQUERY has an issue with concatentation.

    Here is a solution...see this link...it explains your problem exactly.

    http://wisetown.com/

    You have to actually build the entire SQL, including OPENQUERY, the insert, etc in...

    If it was easy, everybody would be doing it!;)

  • RE: Concatenating string

    OK, I just read on BOL...

    'OPENQUERY does not accept variables for its arguments.' (sorry, I missed that earlier)

    So, now that you know that the SQL is good, put your string...

    If it was easy, everybody would be doing it!;)

  • RE: Concatenating string

    Don't hardcode it, take the output of 'SELECT @sql' and run it on the linked server to check to see if the SQL syntax is correct (because that is the...

    If it was easy, everybody would be doing it!;)

  • RE: Concatenating string

    Have you tried to run the SQL (select blah, blah, blah, etc) directly on the linked server?

    If it was easy, everybody would be doing it!;)

  • RE: Concatenating string

    Try this so you can verify the SQL....

    declare @sql varchar(500)

    set @sql = 'SELECT [Test 1] AS Test1, [Test 2] AS Test2, [Sum of ' + @month + '] AS MonthlyAmount...

    If it was easy, everybody would be doing it!;)

  • RE: SUM Question

    If you needed the last (max) PeriodEndDate for each consultant, you can add it in like below.

    This was suggested in your error...column must be in a 'group by' or an...

    If it was easy, everybody would be doing it!;)

  • RE: SUM Question

    Right, because you are using SUM in your select. You must remove the PeriodEndDate from the SELECT as well.

    Why do you want the PeriodEndDate if you are summing all...

    If it was easy, everybody would be doing it!;)

  • RE: SUM Question

    Because you have PeriodEndDate in the 'group by', it is using the date as part of the grouping, which is why multiple rows for same consultant (note that dates are...

    If it was easy, everybody would be doing it!;)

  • RE: Selecting a range from mixed alpha-numeric column

    biscuit (3/17/2008)


    Sorry for the flub.

    Don't worry about it ... we all have our moments. That's why it helps having so many sets of eyes on here to look...

    If it was easy, everybody would be doing it!;)

  • RE: Selecting a range from mixed alpha-numeric column

    There is no range specified in the 5th query, so you should be getting all values.

    If it was easy, everybody would be doing it!;)

  • RE: Selecting a range from mixed alpha-numeric column

    dfalso (3/17/2008)


    I tried this on a SQL 2005 box here and my third resultset is empty.

    I get 5 records, 5 records, 0 records, 3 records, and 13 records.

    I got the...

    If it was easy, everybody would be doing it!;)

Viewing 15 posts - 91 through 105 (of 182 total)