Forum Replies Created

Viewing 15 posts - 4,711 through 4,725 (of 13,460 total)

  • RE: Get the overall status of a particular product

    assuming alphabetical order of the status can be used, this works:

    With MyCTE (Product,Parts,Status)

    AS

    (

    SELECT 'Laptop1','mouse','OK' UNION ALL

    SELECT 'Laptop1','screen','OK' UNION ALL

    SELECT 'Laptop1','button','OK' UNION ALL

    SELECT 'Laptop2','mouse','OK' UNION ALL

    SELECT...

    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: Billing of Materials query

    cidr (9/19/2012)


    Thanks for responding Lowell,

    The only issue with this technique is that there are literally 10s of thousands of parts so I'm not sure if this technique would work; I...

    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: Billing of Materials query

    ok, i think this recursive CTE generates allt eh sub parts you are looking for:

    DECLARE @Table Table(

    Parent varchar(2),

    Child varchar(2) )

    INSERT @Table

    SELECT 'A1','B1' UNION...

    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 know if connection can be made to SQL 2008 R2 in my case? Thanks.

    You could test agaisnt an express instance until your license comes in...just change your connection string;

    there's pretty much only 3 or 4 things in the string anyway; server, database, trusted...

    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 DR Strategy - Advice Reqd

    ferozsql (9/19/2012)


    users are complaining that database are responding very slow?

    create a new post for this question...the original post is from 2009, and very very few peopel will follow it.

    also include...

    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: Weird behavior with a foreign key and "on delete set null"

    just to confirm, it shows correctly in SQL2012.

    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: Weird behavior with a foreign key and "on delete set null"

    it looks like sp_help does nto correctly identify the delete actions.

    if i run this i see the action correctly:

    select * from sys.foreign_keys

    there's a connect item complaining about it here:

    http://connect.microsoft.com/SQLServer/feedback/details/616475/sp-help-doesnt-show-set-null-in-foreign-keys

    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: Copying a column from one table to another with a where statement

    there's two ways to do it;

    one witht he proprietary SQL syntax, and another with a correlated query:

    --SQL Server UPDATE FROM syntax

    UPDATE [Projects]

    SET Projects.Closed = Projects3.Closed

    FROM [Projects3]

    WHERE Projects3.Name = Projects.Name

    --correlated...

    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 data compression can be achieved on SQl Databases/tables

    I think compression may be an enterprise only/Developer version only feature.

    If you don't have neterprise edition, you won't be able to use it, i think.

    there's a really good MS article...

    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: Attended an Interview

    Sean Lange (9/19/2012)


    My answers would have been similar to this.

    1.How many columns a SQL table can hold.

    I did know this one, 1024 or 30,000, depending on whether we are talking...

    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: Unable to login users

    suresh0534 (9/19/2012)


    09-19-2012 07:51:31:817] ExceptionSystem.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

    Suresh

    for me, this says...

    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: Error in After Insert, Update Trigger

    well i converted/scripted everything to consumable format, but i have no idea what you tried to insert into the table.

    a simple INSERT INTO ProjectHours VALUES (10,0,0) works woithout...

    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: Are the posted questions getting worse?

    Lynn Pettis (9/18/2012)


    SQLRNNR (9/18/2012)


    Lynn Pettis (9/18/2012)


    Flat file, 150,000 columns, SQL Server only allows 1,024 columns per table. The flat file needs to be imported into Excel spreadsheets.

    I'm not in...

    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: Saving query results to CSV file with query in job

    adding another option to the mix:

    i threw a CLR export example out on codeplex;

    if you have the ability to add CLR into the mix,then you could use one of 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: Importing and Splitting 150,000 columns flat file into three tables of 50,000 cloumns each

    duplicate post.

    no need to cross post to multiple forums it fractures the answers you get and makes posters duplicate others work.

    the "Recent Posts" link shows us everything.

    continue the thread here:

    http://www.sqlservercentral.com/Forums/Topic1360942-391-1.aspx

    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 - 4,711 through 4,725 (of 13,460 total)