Forum Replies Created

Viewing 15 posts - 10,831 through 10,845 (of 13,460 total)

  • RE: DEFAULT Constraint Definition

    Thanks Michael and Robert;

    I was stuck thinking I could append the default at the end, like i've done with PK/UQ/FK and check constraints.... instead of still part of the column...

    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: DEFAULT Constraint Definition

    it was just an example so i could get the named default constraint in there somewhere ...i didn't really think it through;

    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: Convert inner join to SQL Subquery

    there's a lot of inner joins...which part do you weant to change into a subquery?

    formatted for readability...the exisitng SQL made my eyes cross:

    SELECT DISTINCT

    Auditdata.ID,

    ns.ProviderMaster_ID...

    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: Problem In chageing collation

    note that there are THREE places you can change collation at the server level, for each database, and then again for each column that is of type varchar/nvarchar/char/nchar/text.changing 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: View

    As Far as I Know, there is nothing that has a mapping that says viewname.column1 comes from tablename.somecolumn3;

    obviously reading the code itself might help, but remember the column could be...

    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 query to two databases

    Trout (7/14/2009)


    I have tables in one database with a link being user_id field to other tables in another database.

    how do you connect two different databases to one query.

    ie databaseA 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: Status in sysdatabases

    its a bit field: the database with status= zero has no flags turned on.

    the database with status=16 has one flag turned on: torn page detection.

    WHY one is different than 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: Status in sysdatabases

    here's a SQL i made way back when, base don the bits booksonline tells us for the status:

    SELECT 'name: ' + [name] + CHAR(13) +

    'autoclose: ...

    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: Randomly selecting the records.

    randomizing data returned doesn't always perform well, so I always have to compromise and select fewer rows.

    SET STATISTICS TIME ON

    SELECT TOP 3 object_name(object_id) As TBName,* from sys.columns order by NEWID()

    ...

    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: Urgent Requirement

    do all 520 tables have the DateCreated column with a default of getdate(), so that the tables can be queried individually to archive off the data as desired?

    if not, you...

    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 list of incompatibility error messages on SQL Server 2008?

    I've also seen this error when a column was named to be the keyword "index", and it raises that error.

    check syscolumns where name='index' and see if that's the issue.

    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: Add column at ordinal position programmatically

    dayum, i must have tested in a compatibility 90 database....sorry.

    that was a bit of work to fix, but i figured out how to update the @Results table witht eh columns...

    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: Is that true that we can not install database engine other than C drive in Clustered environment?

    actually, it has to be installed on the %systemdrive%, which in most cases is the C: drive, but depending on how you built your machine originally, the %systemdrive% could be...

    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: SET ROWCOUNT usage with DELETE..

    the top and bottom rows are determined by their order....I'm betting your procedure does not have an ORDER BY clause.

    with out that, SQL server does not guarantee the order or...

    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: Wildcard search for column names

    here is a simple procedure i use all the time;

    stick in the master database, and because it starts with "sp_" and uses the catibility views, it will be functional...

    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 - 10,831 through 10,845 (of 13,460 total)