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
  • Find who dropped a table or column or view

    game-dev help
    5
    0 Votes
    5 Posts
    0 Views
    A
    No, these can only be found if you are logging anything in your system. Like, which account initiated which request, which request made what change and what time it was etc. These type of logged data can help in understanding what went wrong (if the actions were wrong) and who made a change. If there is no log, then stop searching any further because there ain't any. But this one loss would teach you to create a logging system in your environment. The system would log the changes being made, it would store the user's ID, time of change and what change was made. In my opinion, you should also keep a backup of your databases so that if (under any case) a table is lost or data is not integrated anymore, you can revert it back to a previous version. The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
  • Sql Server DataBase

    database sql-server sysadmin
    6
    0 Votes
    6 Posts
    0 Views
    M
    My apologies, I was being sarcastic. The point I was trying to make is that Chris had given him the pointers where he could research and learn how to do the job. Whereas you gave him the solution, which does not help him learn. If it was a difficult question then the example may have been the best way to answer. As it is an extremely basic question the OP needs to do some learning/research/school work rather than cut and paste your answer. Asking someone to "do the needful" is just plain rude. Never underestimate the power of human stupidity RAH
  • 0 Votes
    3 Posts
    0 Views
    A
    And if not Google, then try out MSDN, Understanding Isolation Levels[^]. (It has the answer) The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
  • Must I use transaction if I want to use the DB Locks?

    database help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    5 Posts
    0 Views
    R
    @indian1433, you can try with sp_MSforeachdb and sp_MSforeachtable .Please check out and let us know if the hint has helped you. N.B.~ Since you mentioned that it's just for internal purpose, so I have mentioned those two undocumented Stored Procedure. Please don't use it in production since they r undocumented and there is no guarantee that in future MS will not remove them (:
  • Error in IF statement in MySQL

    announcement database mysql com sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    W
    Apart from what Eddy Vluggen said, you might want to look up MySQL's REPLACE[^] and/or INSERT ... ON DUPLICATE KEY UPDATE[^] syntax as an alternative way to achieve your goal.
  • Load data from Excel which has columns in multiple rows

    algorithms question
    5
    0 Votes
    5 Posts
    0 Views
    I
    Hey Rick, thanks I got it sort out my friend here is the sample one may be somebody has the same issue. SELECT * INTO #xxxxxxs FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0 Xml; HDR=YES; IMEX=1; Database=C:\xxxxxxx\Dont Remove ThisFolder\xxxxxxs.xlsx', 'SELECT * FROM [Back xxxxx$]'); I have a question here, do we have any way to copy the existing schema structure into a table variable, along with an identity column? Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
  • Use column output, to get new column

    database sql-server sysadmin help
    2
    0 Votes
    2 Posts
    0 Views
    M
    Join back to your user table using the managerid ot userid to get the managers details Select U.*, M.* From UserTable U inner join UserTable M on M.userID = U.ManagerID Never underestimate the power of human stupidity RAH
  • select to Cancatenate sub group values under a group

    database help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Move GROUP_CONCAT's comma values to columns

    com question announcement
    3
    0 Votes
    3 Posts
    0 Views
    J
    anybody can help please? Technology News @ www.JassimRahma.com
  • 0 Votes
    6 Posts
    0 Views
    D
    You can't define a primary key on a nullable column, so first you will need to ensure there are no null values in the Categories column and in the Sequence column. Then you can alter the table so these columns are not null: ALTER TABLE [Application] ALTER COLUMN Categories NVARCHAR(1) NOT NULL ALTER TABLE [Application] ALTER COLUMN Sequence NVARCHAR(1) NOT NULL Then you can create your primary key: ALTER TABLE [Application] ADD CONSTRAINT PK_Application PRIMARY KEY (Categories, Sequence)
  • Amazon RDS IP Address

    question database help
    3
    0 Votes
    3 Posts
    0 Views
    R
    Thanks - I'll check that out.
  • 0 Votes
    2 Posts
    0 Views
    Richard DeemingR
    Nobody here is going to do your homework for you. It is set to test what you know, not what a bunch of random strangers on the Internet know. If you genuinely don't know where to start, then talk to your teacher. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • Schema update using SQL Server Data Tools

    database help question sql-server sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    I
    No I am just adding a Foreign key constraint still it errors it out, because in the new database we have added Foreign Key constraint that we want to sync it to the old database without losing the data. Another place it is erroring out is at a View which is referencing tables from other databases and other servers as well. Any idea how to resolve these things? Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
  • 0 Votes
    2 Posts
    0 Views
    M
    A quick search and a little light reading and I get this information from http://sqlblog.com/blogs/jamie_thomson/archive/2014/01/18/dacpac-braindump.aspx[^] Dacpacs are used for deploying SQL Server objects to an instance of SQL Server It seems you are trying to reference it like a database rather than installing it to the server. Never underestimate the power of human stupidity RAH
  • 0 Votes
    3 Posts
    0 Views
    D
    How many people will use the front-end, and are they located in the same office? Will all your users be working on computers within a single LAN, or are they working from locations that are geographically distributed? How much control do you have over your users' deployment environment? A Microsoft Access front-end is almost certain to be the simplest and fastest solution to implement, but it comes with some limitations that are important to consider. I generally prefer ASP.NET because then the UI is accessible to anyone with a web browser. This makes the application easier to distribute and update - but it is likely to be more difficult and more time-consuming to implement.
  • Filling many to many rel table using Select statement

    help css
    5
    0 Votes
    5 Posts
    0 Views
    I
    I got it Kuldeep, thanks for your support, it is possible by using Merge and Table Variables. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
  • Limiting the scope of a Table variable

    question database com tools help
    3
    0 Votes
    3 Posts
    4 Views
    I
    Perfect, thank you very much Holmes. Thanks, Abdul Aleem "There is already enough hatred in the world lets spread love, compassion and affection."
  • 0 Votes
    5 Posts
    0 Views
    C
    I'm adding the minutes to @OpenDT so it does work - @ODate is superfluous and can be removed ========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================
  • Insert within Select Statement

    question
    5
    0 Votes
    5 Posts
    0 Views
    M
    You could use an onInsert trigger spit to insert the new records into TabC. Caveat an error on the trigger is a bitch to locate in the future. Never underestimate the power of human stupidity RAH