Skip to content

Database

Discussions on database access, SQL, and ADO

This category can be followed from the open social web via the handle database@forum.codeproject.com

17.1k Topics 61.8k Posts
  • Trouble with LEFT JOIN SQL Statement

    database help sql-server sysadmin cryptography
    7
    0 Votes
    7 Posts
    0 Views
    S
    The LEFT OUTER JOIN or simply LEFT JOIN return all rows from the first table listed after the FROM clause or left of JOIN keyword , no matter if they have matches in the right table of the JOIN keyword. Syntax : FROM table1 LEFT OUTER JOIN table2 ON table1.column_name=table2.column_name ; Check here lot of examples : http://www.w3resource.com/sql/joins/perform-a-left-join.php
  • Product of Salary

    database help question career
    20
    0 Votes
    20 Posts
    2 Views
    W
    Hi, Even though you mentioned that you don't want to use PL/SQL you could be interested in this: Custom aggregates in Oracle[^] Best regards, mika The need to optimize rises from a bad design.My articles[^]
  • How to make this

    tutorial
    13
    0 Votes
    13 Posts
    0 Views
    A
    Klaus-Werner Konrad wrote: that confused me you shouldn't be (i am not familiar with database) :-D 100 :rose: Help people,so poeple can help you.
  • Updating Columns

    database tutorial javascript php html
    5
    0 Votes
    5 Posts
    0 Views
    W
    I found it out. Simple enough.. I was just only wondering WHERE I should make the SQL code. I'm using SQL Manager Lite for MySQL and you just have to go to the database table, click the DLL tab, edit, delete all the code and write whatever you want and execute. UPDATE tablename SET columnname = 'whatever' WHERE columname = 'asdf' OR columname = 'asdf ®'
  • SSIS re-validation of metadata

    question database sql-server com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • ADO events

    tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    C
    I am also want to know thx!
  • mysql select from multiple tables / databases

    database mysql tutorial question
    5
    0 Votes
    5 Posts
    0 Views
    P
    of course you can use the database.table.field syntax on mysql. the query i wrote works i only asked if someone has a better approach because the query gets difficult to follow once i use more databases and tables. The join operation joins tables on certain values. I don't need the joined. I just need to see where in those tables (the row id) a value is found.
  • Report Builder 3.0

    help tutorial
    2
    0 Votes
    2 Posts
    0 Views
    K
    Are you talking about Gupta Report Builder ?
  • 0 Votes
    13 Posts
    0 Views
    J
    Naerling wrote: and they want to be able to see when someone else is editing a row. That is a pretty specific request. If that is the exact request then you have no choice but to 1. Track the user when they are in edit mode. 2. Mark the row as being in the editing process. Given that you will also have other concerns such as A. What do you do if the user goes to lunch or on vacation? B. What happens if the users application crashes? C. What if someone else must make an immediate update when another person who is unavailable is editing it. D. What is the exact notification process. The specifics of how you implement the solution depends on the architecture but writing a value to the database is one possible way to solve 2 above. It however solves only that. Naerling wrote: Telling this customer that this is not a good idea is not a good idea... We do it their way, period At least as long as they are willing to pay for it and it does not impact your other customers.
  • Database Directory

    database sql-server sysadmin question
    8
    0 Votes
    8 Posts
    0 Views
    P
    Anywhere but under Program files. All Users App Data should work.
  • how to make server & clients?

    database question sql-server sysadmin windows-admin
    3
    0 Votes
    3 Posts
    0 Views
    C
    See if xp_cmdshell is what you are looking for. It allows you to run a windows command from within a T-SQL stored procedure.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • MySql connector and VS2010 SP1

    php mysql com help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    4 Posts
    0 Views
    C
    Watch using Access to SQL as Microsoft helps you by creating columns that are NOT what is wanted. I have to live with postal code being a float because the person moving data from Access to SQL did not know what they were doing. As long as we only do work in the US it is not a major problem but comparison can be tricky.
  • 0 Votes
    8 Posts
    0 Views
    O
    Please check the following link which might help you: http://www.sqlteam.com/article/comparing-tables[^] Om Prakash Pant
  • 0 Votes
    3 Posts
    2 Views
    J
    overloaded Name wrote: There got to be something wrong with my user creation I suppose that is possible if 1. Your wrote your program in C/C++ 2. You have a bug (or several) in your code. Supposing that the first is true then when you attempt to interact with the database you will get error information back (if your code doesn't have bugs.) So reporting that information is useful. And if that error is such that the app can no longer proceed then the application should gracefully exit.
  • Parent-children Listing

    help
    11
    0 Votes
    11 Posts
    0 Views
    A
    thank you Russell. ;) 100 :rose:
  • Two physcial servers with same Database name server

    database sysadmin question
    2
    0 Votes
    2 Posts
    1 Views
    W
    Hi, vanikanc wrote: WE need to name the new database server as our current one First let's separate two totally different things: - the name of the database server is just an alias for the IP-address. So this means that you cannot have two different machines having the same name (thus the same IP-address) at the same time or you'll have enormous problems in you network - the name of the SQL Server instance (the service) is used to distinguish separate SQL Server services on the same machine. So basically your question is client-related. If you want to make the switch-over to the new (physical) server you have to be able to re-configure your clients to start using the new server. For example if your old SQL Server is ServerProduction1\Instance1 (meaning for example 10.1.123.1,1433\Instance1) you would change the client to connect to ServerProduction2\Instance1 (meaning for example 10.1.123.7,1433\Instance1). Of course the instance name can also be changed. vanikanc wrote: Can we have two such database servers at a given time? So the answer from the client side point of view is no. Which one would they connect to? vanikanc wrote: How can we migrate from one server to another with no lag time, since it is the production server constantly collecting data You restrict the changes to the original database during the transfer, transfer all the data from server 1 to the server 2, re-configure the clients to connect to server 2 and off you go. The need to optimize rises from a bad design.My articles[^]
  • Flatten data (SQL)

    question database
    8
    0 Votes
    8 Posts
    0 Views
    L
    Thanks!
  • 0 Votes
    6 Posts
    0 Views
    J
    You can use a union, as already suggested, and with SQL Server you can also use the UNPIVOT command. WITH myData(Store , Mth , Sale , Purchase ) AS ( SELECT 'A','Jan', 2000,150 UNION SELECT 'B','Jan', 1000,200 ) SELECT Store, Mth, Expense, Value FROM ( Select Store, Mth, Sale, Purchase FROM myData ) p UNPIVOT ( Value FOR Expense IN (Sale, Purchase) ) AS unpvt; Let me explain that a bit. The first bit (Starting 'WITH') just gives us some example data, I have added a second row onto your original data to help confirm the result. The second bit (Starting 'SELECT') Selects the data from an unpivoted view of your SALE and Purchase columns. The result of the above query is A Jan Sale 2000 A Jan Purchase 150 B Jan Sale 1000 B Jan Purchase 200