User Profile

Collapse

Profile Sidebar

Collapse
pkreemer
pkreemer
Last Activity: May 7 '07, 03:30 PM
Joined: Apr 13 '07
Location: Seattle, WA USA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • pkreemer
    replied to Simple query for MSSQL
    That's a good idea to do a count(*). And that query will just return one row, but the value it returns will be the number of rows in the table.

    Paul
    See more | Go to post

    Leave a comment:


  • pkreemer
    replied to Denormalized Database Inquiry
    This sounds like a great interview question. :-) So my simple practice has been (for general, mixed OLTP and reporting databases) that you start your design out pretty well normalized - 3rd normal form or close to it.

    Then for purposes of reporting, or possibly high volume transactions, you can allow some denormalization to creep in. One common example would be for totals in an order, where the order consists of a master Order row...
    See more | Go to post

    Leave a comment:


  • pkreemer
    replied to Sessions Lost With SqlServer
    in .NET
    Joe, do you get this problem when your app isn't setup on a web garden? And it doesn't happen periodically, but more randomly?

    No real help from me, just thinking of things that might be involved.

    Paul
    See more | Go to post

    Leave a comment:


  • Hi kwcraft, you can do this with a SQL update statement. Just to be sure, TypeCode is in the po table?

    Try this:

    Code:
    UPDATE ActivityPartybase 
       SET  ParticipationTypeMask = 7
          FROM ActivityPointerBase po
             WHERE 
                po.TypeCode = 4201 
                AND po.activityID = ActivityPartybase.activityID
                AND po.OwningUser = ActivityPartybase.Activit
    ...
    See more | Go to post

    Leave a comment:


  • pkreemer
    replied to SQL Query using 'OR' Causing problems
    Hi Mark, well it doesn't matter how many ANDs you use, it's the fact that you added an OR. :-) Throwing an OR into your boolean statement will usually require you to do some grouping to get the right behavior.

    Here's my quick attempt at an pseudo code example. The first two statements define a desired outcome. Then I give a correct and incorrect way of combining them.
    Code:
    If  A=1 AND B=2 Then print "got it"
    ...
    See more | Go to post

    Leave a comment:


  • pkreemer
    replied to quick question
    So you're declaring these at the top of the page? Outside of any routines? You'll probably need to post more code to get some help.

    One guess is that you're declaring the same variables again inside your routine. Reusing the same variable names locally and globally (or page-level as I'd call it in ASP) is legal and could cause the problem you describe.
    See more | Go to post

    Leave a comment:


  • pkreemer
    replied to Many tables or a big table with views
    Well you can have a number of tables using a Mem_ID field as a foreign key, but they'd all refer to a single Members table. The Mem_ID field itself is an integer and you wouldn't worry about the size of your foreign key fields. Having a logical, clean design and consistent data should be more of a focus.

    Is that what you're asking about duplication of data? Maybe you can explain your concern more, as I don't think I'm quite understanding...
    See more | Go to post

    Leave a comment:


  • Have you first compiled the app? In Release - not Debug mode. And posted the resulting DLL found in your bin folder? Just copy the bin folder to your web server. And don't post any of your *.vb files.

    Of course this is the barest of information on deploying an ASP.Net application, but you should be okay for an intranet type situation.
    See more | Go to post

    Leave a comment:


  • pkreemer
    replied to Newbie and Error Msg
    Sounds like a problem deleting a file. I think you're close, but not quite on the right line that threw the error.

    To fix, you'll have to find out what folder is involved and add permissions to the account which is running your ASP application. So yes, it really sounds like that change of permissions caused this bug to pop up.

    If you're going to do much of this work you'll probably want Dreamweaver or Visual Studio...
    See more | Go to post

    Leave a comment:


  • pkreemer
    replied to SQL Query using 'OR' Causing problems
    Mark, you just need some parentheses to group your locations. Whenever you mix ANDs and ORs you'll need to structure them a bit.

    You had this:
    Code:
    SELECT * FROM tblDetails WHERE Dummy LIKE 'x'
    AND Location_ID LIKE 'L3' OR Location_ID LIKE 'L5'
    AND Family_ID LIKE 'F2'
    But you want this:
    Code:
    SELECT * 
    FROM tblDetails 
    WHERE Dummy LIKE 'x'
    AND ( Location_ID LIKE 'L3' OR
    ...
    See more | Go to post

    Leave a comment:


  • pkreemer
    replied to Avoiding UNIONS
    Or, maybe just a tiny bit faster, but more verbose:
    Code:
    SELECT
        Emp_No,
        Emp_Name,
        Salary
    FROM
        Employee
    WHERE
        Band='A' OR Band='B' OR Band='C'
    But the IN statement is so handy.
    See more | Go to post

    Leave a comment:


  • pkreemer
    replied to Many tables or a big table with views
    It sounds like you really want one table! :-) And if you're not interested in learning a few database concepts, then you might be better off with one table. Certainly you can hack things together and it can seem more concrete and logical. Everything is in one place.

    To break it into separate tables, you'd need different queries to join your information back together into reports. It's not usually hard but it's one more thing...
    See more | Go to post

    Leave a comment:


  • pkreemer
    replied to Simple query for MSSQL
    I think iburyak might have dropped a SELECT when cut n pasting. Otherwise I just pasted the same solution.

    Try this, and of course you'll need to replace '<table_name>' with the actual name of the table that these fields are coming from. Or are they coming from more than one table? When creating a view, you do need to know your database structure. :-) And do you have permissions to create views on that database?
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...