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
  • changing password for sql server login

    sharepoint database sql-server sysadmin help
    9
    0 Votes
    9 Posts
    0 Views
    L
    Thank ee Jim lad! Some scurvy knaves be cruisin' around these 'ere parts! Unrequited desire is character building. OriginalGriff
  • joint

    8
    0 Votes
    8 Posts
    0 Views
    G
    With Oracle, we are used to joining datasets by combinations of datasources in the FROM clause and a WHERE clause to join them together. Datasets are usually tables, but can also be views, in-inline views, subqueries, table functions, nested tables and so on. Oracle join syntax is generally as follows: SELECT ... FROM dataset_one d1 , dataset_two d2 WHERE d1.column(s) = d2.column(s) AND ... With this syntax we separate datasources by commas and code a single WHERE clause that will include the join predicates together with any filter predicates we might require. ANSI join syntax is slightly different on two counts. First, we specify the type of join we require and second we separate the join predicates from the filter predicates. ASNI syntax can notionally be expressed as follows: SELECT ... FROM dataset_one d1 JOIN TYPE dataset_two d2 ON (d1.column(s) = d2.column(s)) --<-- can also use USING (column(s)) WHERE filter_predicates... As commented, the ON clause is where we specify our joins. If the column names are the same, we can replace this with a USING clause. We will see examples of both methods for expressing join predicates throughout this article. Given this pseudo-syntax, we will examples of the following join types in this article. * INNER JOIN * NATURAL JOIN * CROSS JOIN * LEFT OUTER JOIN * RIGHT OUTER JOIN * FULL OUTER JOIN inner join When we join two tables or datasets together on an equality (i.e. column or set of columns) we are performing an inner join. The ANSI method for joining EMP and DEPT is as follows. SQL> SELECT d.dname, d.loc, e.ename, e.job 2 FROM dept d 3 INNER JOIN 4 emp e 5 USING (deptno); DNAME LOC ENAME JOB -------------- ------------- ---------- --------- RESEARCH DALLAS SMITH CLERK SALES CHICAGO ALLEN SALESMAN SALES CHICAGO WARD SALESMAN RESEARCH DALLAS JONES MANAGER SALES CHICAGO MARTIN SALESMAN SALES CHICAGO BLAKE MANAGER ACCOUNTING NEW YORK CLARK MANAGER RESEARCH DALLAS SCOTT ANALYST ACCOUNTING NEW YORK KING PRESIDENT SALES CHICAGO TURNER SALESMAN RESEARCH DALLAS ADAMS CLERK SALES CHICAGO JAMES CLERK RESEARCH DALLAS FORD ANALYST ACCOUNTING NEW YORK MILLER CLERK
  • Alter Query

    database tutorial question
    6
    0 Votes
    6 Posts
    1 Views
    G
    alter exists column datatype. alter table tblname alter column columnname datatype(variablesize) or add new column................ alter table tblname add columnname datatype(variablesize)
  • How to combine results in cursor?

    database tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    G
    Dear you try....... you can reduce your null selection by is null clause. you can use union or union all are two method combine multiple results set. select 101 union select null union select 102 union select null union all result will be as... null, null 101 102 101 102 create table temp table insert into @temptable(ID) select 101 union select null union select 102 union select null select * from @temptable where id is not null ......................... try this......
  • 0 Votes
    4 Posts
    1 Views
    G
    try something like this. start your transaction begin transaction a insert into tableA if(@@rowcount > 0) begin insert into tableB commit transaction a end else (@@error > 0) begin rollback transaction a end
  • Sql Server Table Partitioning

    question database sql-server sysadmin help
    10
    0 Votes
    10 Posts
    0 Views
    J
    That's not really the best partitioning column. What you want is to partition the table so that queries is only fetching or inserting data to and from one partition at a time, if possible. For example, If you want to partition a sales table, the date column would normally be a good choice. Most updates, inserts and queries would be done on the current year partition. List of common misconceptions
  • Oracle Range Partitioning

    oracle question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • is it true about MSSQL Database server

    database sql-server sysadmin
    8
    0 Votes
    8 Posts
    0 Views
    S
    dont worry, they wont forget to add 10% on the top for being part of your business. :wtf: Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
  • can Microsoft SQL Server handle it?

    database sql-server sysadmin question
    10
    0 Votes
    10 Posts
    0 Views
    S
    if sql server can handle NASDAQ[^] then it could handle anything any of us could throw at it. Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
  • CDC and views

    database tools help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • This should be simple

    sharepoint collaboration
    6
    0 Votes
    6 Posts
    0 Views
    B
    Andy_L_J wrote: hanks for your time Blue_Boy, My pleasure to help others :) I Love T-SQL "VB.NET is developed with C#.NET" If my post helps you kindly save my time by voting my post.
  • Ms Access file Missing

    database
    6
    0 Votes
    6 Posts
    0 Views
    K
    I have been using MS Access as a backend with VB6 for over a decade. Our software works with Access or SQL Server depending on customer size and usage. 95% of the code base is the same. The only time I have seen Access (2000 or better) become corrupted is when more than about 6 or 7 users might hit it at the same time...combine that with a crappy network and it spells trouble. The bottom line is that Access does not perform will with multiple connections over a network. (permissions can also be a bi*ch since Access has to create a lock file) If the database gets corrupted everytime you start the program, then obviously you will have to solve that issue first. "Go forth into the source" - Neal Morse
  • 0 Votes
    12 Posts
    41 Views
    W
    Agree with this. Answer upvoted. The need to optimize rises from a bad design.My articles[^]
  • 0 Votes
    7 Posts
    0 Views
    J
    Seems reasonable as long as you have verified that. And also verified that it is not in some other way serializing requests.
  • SQL Paging

    database csharp asp-net sysadmin question
    5
    0 Votes
    5 Posts
    1 Views
    D
    Mycroft Holmes wrote: One of the issues we have is that the users are always after data dumps to analyse in excel Does that not imply that something is missing from the application? I'm guessing because I don't know the business requirements, but if they are constantly extracting data into another tool to analyse, that suggests that they need some sort of information they can't get from the source application.
  • Picture's in the database?

    asp-net question csharp database architecture
    10
    0 Votes
    10 Posts
    0 Views
    D
    Mika Wendelius wrote: One of the main points is the transactionality. In case of an error you don't have to worry if the database contains a path to a non existent file or vice versa. So it wil be Strongly Typed" This I like! :) Mika Wendelius wrote: Second thing, backups. When you backup the database you also backup the files. No separate backups. This I like Alot! :) Mika Wendelius wrote: Thirdly, speed with larger files compared to storing all the binary info inside the database. This should not be a problem, because I Intend to re-size the Images. Mika Wendelius wrote: And the fourth thing, which I haven't covered very much yet is that you can actually stream the file better to the client when fetching. This on the other hand I Love. But I will have to learn a bit more about. Looks like Google time! :) Frazzle the name say's it all
  • Regarding performance tunnig

    performance
    5
    0 Votes
    5 Posts
    1 Views
    P
    SQL Server understands both the operators...no issue at all
  • SSIS - How To Create This Package

    sql-server tutorial
    3
    0 Votes
    3 Posts
    0 Views
    P
    Follow the series of the video tutorials.. http://www.youtube.com/watch?v=tPdUYpi-m10[^] hope it helps.
  • RelationShip between to DataBase in SqlServer2008

    database help
    4
    0 Votes
    4 Posts
    0 Views
    W
    Guessing that you mean one of these: - foreign key between tables, see: http://msdn.microsoft.com/en-us/library/ms175464.aspx[^] - or the ability to use external tables in Access. There's no exact match for this but Linked Server is very close. See: http://msdn.microsoft.com/en-us/library/ms188279.aspx[^] The need to optimize rises from a bad design.My articles[^]
  • MS Access

    database tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    W
    Are you using Access for development? If you are, it's advised to use linked tables instead of external tables. See for example: http://www.techonthenet.com/access/tables/link_table.php[^] The need to optimize rises from a bad design.My articles[^]