Forum Replies Created

Viewing 15 posts - 3,721 through 3,735 (of 13,460 total)

  • RE: synonyms for table column

    As far as i know, a SYNONYM must point to an object, that is, something that exists in sys.objects. that's typically, a table/view/procedure/function, but could technically be anything that exists...

    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: Want to categorize the salaries of employee.

    i think you can streamline it a bit by using a neat technique using SUM(CASE..)

    SELECT

    SUM(CASE WHEN SALARY BETWEEN 10000 AND 20000 THEN 1 ELSE 0 END) As Range1,

    SUM(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: Trying to Add User with Access to One Stored Procedure

    it might not be obvious;

    for example, if it's a windows account, ie mydomain\lowell has too much access, it's probably because i'm in a windows group

    that has direct or implied access

    SQL...

    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: Trying to Add User with Access to One Stored Procedure

    it sounds like the user in question has a LOGIN which was granted sysadmin privileges.

    i don't have QA available for SQL2000 anymore, but you can go to the properties 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: MSSQL, Oracle, MySQL openquery...

    i'm not clear ont he question, i may be reading it too fast.

    if the question is "how do I execute a stored procedure via OPENQUERY,a dn capture the results, 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: How to copy some objects (tables, views, store procedures) from one DB to another DB?

    DDL only, or DDL and also the data?

    if it's just the DDL , i'd use the SSMS scripting wizard.

    IN SSMS Object Explorer,

    Right Click on a specific database.

    Click Tasks>> Generate...

    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: MSSQL, Oracle, MySQL openquery...

    adinica (4/5/2013)


    Thank you. It was exactly what i was trying right now. I have a question, how do I refer to the server I am on in the openquery? Is...

    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: MSSQL, Oracle, MySQL openquery...

    if you create a permanent or temp table that has the shape of the data, you can insert into it;

    a rough example, but it works on my side, assuming 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: Char(9) to Time

    i think the OP should probably just convert the time to seconds, and use DATEADD whenever he needs to fiddle with the values.

    at least , as an integer, you could...

    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: Possible bug in Microsoft system stored procedure

    David McKinney (4/5/2013)


    Your confusion is understandable...it's actually called [sp_fulltext_catalog] (without the s).

    doh! now i see it!

    i just peeked at my other instances, and the same code is in 2008R2 and...

    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: Possible bug in Microsoft system stored procedure

    i'm still confused and looking in the wrong place, clearly.

    i did sp_helptext 'sys.fulltext_catalogs', and it's a system view on my 2008 instance, i'm not seeing the same code you posted;

    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: Possible bug in Microsoft system stored procedure

    i would disagree.

    if you look at the definition for 'sys.fulltext_catalogs' via sp_help, the datatype is clearly int for the column fulltext_catalog_id you are selecting

    /*

    Column_name ...

    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 Minimally Logged Operation to Cause Checkpoint!

    you can explicitly call CHECKPOINT yourself, would that help?

    --UPDATE MyTABLE ....

    --INSERT INTO SomeTable

    CHECKPOINT

    --UPDATE MyTABLE2 ....

    --INSERT INTO SomeTable2

    CHECKPOINT

    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 migration

    balasach82 (4/5/2013)


    Error: 18456, Severity: 14, State: 5.

    The login ZZZZ exists and it is linked to the user in the db. Still we get the error

    >>> Login failed for user...

    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: Orphaned users

    here's a very similar version when compared to Jasons;

    if a user matches it's login SID, it fine and nothing needs to be changed.

    If the SID doesn't match , it builds...

    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 - 3,721 through 3,735 (of 13,460 total)