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
  • 0 Votes
    3 Posts
    0 Views
    D
    Mycroft has given you some good advice. In terms of your original question, yes this will be reliable if you serialize the transactions. Incidentally, this will reset before 1000, not after. I assume that is what you want, so you are generating your business numbers in the range 1001... to 1999...
  • Changing CommandText changes Parameters

    csharp visual-studio tutorial question
    14
    0 Votes
    14 Posts
    3 Views
    P
    Nor do I. :thumbsup:
  • DB architecture

    database question architecture
    11
    0 Votes
    11 Posts
    0 Views
    L
    adilsardar wrote: The database contains approx 260 tables and what we need is the data from appox 150 tables. That's over 50%. How much data would that be, in megabytes? And how often will you run this query? adilsardar wrote: Is ssis packages are good solution if we use separate db's and then sych them.? I don't have personal experience with SSIS, but replication sounds good. I are Troll :suss:
  • 0 Votes
    6 Posts
    0 Views
    P
    More reason not to use stored procedures. Try a table-valued function instead.
  • Help me with the query strings.

    database security help question
    5
    0 Votes
    5 Posts
    0 Views
    M
    I was getting the same error. Ur soultion worked. Thanks a lot. Meenal Ronghe.
  • SQL Syntax request...Please Help...

    database help
    7
    0 Votes
    7 Posts
    0 Views
    P
    Yes, I took part. I prefer outer join -- because of portability and such.
  • retrive deleted column

    question
    9
    0 Votes
    9 Posts
    1 Views
    Q
    If this is production AND you have a backup, you may not want to restore over the top of a production database. you can instead restore to a new database, then add the column allowing nulls, use an update query to put the data back leaving anything in the other columns unchanged. depends on the nature of your data and environment.
  • remote connection sql express 2008

    database sysadmin
    4
    0 Votes
    4 Posts
    0 Views
    M
    http://www.sql-articles.com/scripts/enabling-remote-connections-via-dos-or-t-sql[^] the actual link! THANK YOU :laugh:
  • SQL DATABASE

    database debugging help tutorial question
    11
    0 Votes
    11 Posts
    0 Views
    S
    We use code version tool. We also include the version number as comments in stored procedures and functions. Out versioning tool automatically applies the versioning comments.
  • Problem with a T-SQL 2005 PIVOT

    database help sql-server sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    S
    Thanks for the reply, but your suggestion did not work. I have now resolved the problem, and my final SELECT query now looks like this :- SELECT * FROM ( SELECT * FROM vuWeighTicketReport WHERE [TicketDate] >= '2010-09-10' ) AS Tickets PIVOT ( SUM(ProductWeight) FOR ProductCode IN ( [Blood],[Bonecake],[Carcass],[CFat],[Desiel],[DMeal],[Feather], [FMeal],[Greaves],[Head],[Misc],[Offal],[PBlend],[PFB],[PMeal], [Skin],[Slurry],[Tail],[Tallow],[TBottom],[Thigh],[TMeal],[Wash] ) ) AS TicketProductWeights The only difference to the original is that I have added AS TicketProductWeights to the end. Typically, the problem was stiring me in the face, and I couldn't see it. :doh: Thanks again. Steve Jowett ------------------------- Real Programmers don't need comments -- the code is obvious.
  • About the datatype size

    question
    5
    0 Votes
    5 Posts
    0 Views
    D
    thanks. I used nvarchar(max). just trying to know which one holds large data like 2-3 pages. i haven't worked with large data before. suchita
  • PostgreSQL or MySQL?

    database mysql postgresql question
    12
    0 Votes
    12 Posts
    1 Views
    J
    I worked at a teaching hospital for about 18 months and the db licenses there were dirt cheap. (Less than 1/3 the retail price) I assume because it was attched to a University. This applied to Oracle and SQL Server (and yes, I am talking about a production license in both cases). YMMV - A lot has changed in seven years, so this may be completely irrelevant. HTH, -Chris C.
  • SQL Server CAL

    database sql-server sysadmin architecture question
    9
    0 Votes
    9 Posts
    1 Views
    T
    SQL Express is totally free, and has no requirement for CALs or any other form of license. Other editions of SQL Server can be licensed per processor or by CAL as per SQL Server 2008: SQL Server 2008 Licensing[^] If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]
  • Recover SSIS file

    help sql-server security question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Encrypt PostgreSQL

    database postgresql sysadmin question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    3 Posts
    0 Views
    C
    I agree with Mycroft (second time today) this is more of an art than a "do it this way" type thing. There are so many variables that there is no easy answer. Some things to look into (learn about) would be Data Base Tuning Advisor and audit trace for a start. These may or may not help. There are also several third party programs that might help, again Google may help. You might look at Idera as one provider.
  • How to keep one more backup copy of current database.

    database tutorial
    3
    0 Votes
    3 Posts
    0 Views
    C
    Look into replication (publication) or log shipping. Depending on your usage and resources the type you use may very. You can replicate to the same SQL server.
  • Partioning table

    tutorial
    2
    0 Votes
    2 Posts
    0 Views
    M
    Partitioning a table is NOT what you want to do, that is dealing with VERY large tables and requires DBA skills. You are after a data structure. You have 3 tables crammed into 1. Employee EmployeeID EmployeeName StateID Country CountryID CountryName State StateID CountryID StateName Employee View Select * From Employee E Inner Join State S on S.StateID = E.StateID Inner Join Country C on C.CountryID = S.CountryID Never underestimate the power of human stupidity RAH
  • How to find the latest

    database tutorial
    7
    0 Votes
    7 Posts
    1 Views
    S
    Could you pls tell me how you are created backup database. where i am using only single database to keep my 10000 record of info. if something goes wrong what to do... ************ S G KORE *******************
  • String manipulation in stored procedures (MySQL 5.1)

    database mysql help tutorial
    3
    0 Votes
    3 Posts
    0 Views
    P
    Sylv33 wrote: loops through all rows in a table The engine should do that; you shouldn't.