Forum Replies Created

Viewing 15 posts - 91 through 105 (of 181 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,...

  • 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...

  • 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...

  • 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...

  • 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,...

  • 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...

  • 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...

  • RE: Concatenating string

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

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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.

  • 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...

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