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
  • error during update openquery

    database oracle help question announcement
    3
    0 Votes
    3 Posts
    0 Views
    M
    Hello Eddy, Thanks for reply me. In the end, my update should be in a final table and this means to have also a join between the final table and the temporary one but this makes me thinking to try using a view for entire join selection and use it into the openquery. I will try this and let you know. Cheers, Mikcutu.
  • Store procedure

    tutorial
    5
    0 Votes
    5 Posts
    0 Views
    D
    Thanks
  • update table structures from another server

    mysql sysadmin announcement
    2
    0 Votes
    2 Posts
    0 Views
    W
    Your best bet would be to get a copy of MySql workbench MySQL Workbench Downloads[^], then under Server Administration -> Data Dump -> Advanced Export Options, you can select the No Data option, and this will give you a script which will contain all the Create Table statements for the selected database, without data. You can also select to include all stored procedures in the same script. Hope this helps When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
  • transfer mysql proceedures

    mysql question announcement
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Error can not attach a database with the same name?

    database help question
    4
    0 Votes
    4 Posts
    1 Views
    U
    I did it, thank you much
  • 0 Votes
    5 Posts
    0 Views
    L
    Same applies; if you had a field called "database", you could drop them all in the same structure. Small example; EmplyeeTable Id Name OtherStuff 1 John Bla becomes; EmplyeeTable Id Name OtherStuff Database 1 John Bla Customer1 That way you could select everything from that customer, even if there's more than one customers data. Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
  • Inserting rows dynamiccaly on based on calculation

    database question
    3
    0 Votes
    3 Posts
    0 Views
    _
    Try this CREATE TABLE #Temp ( ID INT IDENTITY(1,1), col1 VARCHAR(50), Col2 VARCHAR(50), Col3 VARCHAR(50), position VARCHAR(50) ) CREATE TABLE #Temp2 ( col1 VARCHAR(50), Col2 VARCHAR(50), Col3 VARCHAR(50), position VARCHAR(50) ) INSERT INTO #Temp SELECT 'aaa', 'rack1', '1-3', '3' UNION SELECT 'bbb', 'rack2', '22-23', '2' UNION SELECT 'ccc', 'rack3', '19-20', '2' DECLARE @TotalRowCount INT DECLARE @RowCount INT DECLARE @Positon INT DECLARE @I INT SET @RowCount = 1 SELECT @TotalRowCount = COUNT(*) FROM #Temp WHILE @RowCount <= @TotalRowCount BEGIN SELECT @Positon = Position FROM #Temp WHERE Id = @RowCount SET @I = 1 WHILE @I <= @Positon BEGIN INSERT INTO #Temp2 SELECT Col1, Col2, Col3, (SUBSTRING(Col3,0,CHARINDEX('-',Col3)) + @I - 1) FROM #Temp WHERE Id = @RowCount SET @I = @I + 1 END SET @RowCount = @RowCount + 1 END SELECT * FROM #Temp2 DROP TABLE #Temp DROP TABLE #Temp2
  • NOLOCK Applicable to All Tables

    database
    4
    0 Votes
    4 Posts
    0 Views
    C
    Sorry to take so long to get back with you but I was on vacation. Take a look at: SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED --avoids deadlock Since NOLOCK is a 'hint' it is only for the one command.
  • Using float and like

    database question
    4
    0 Votes
    4 Posts
    0 Views
    P
    berba wrote: if it's a good Most likely not; all those conversions will kill you. What are you trying to do? Perhaps you want BETWEEN? As mentioned, converting the parameter value (once) is much better* than converting all the values in the column. * Anecdote: I once inherited maintenance of a batch program that took forty minutes to run; after fixing the conversions it took only ten minutes.
  • 0 Votes
    18 Posts
    0 Views
    J
    Keep in mind that as formatted that solution is open to SQL injection attacks.
  • How to run a job daily in Oracle and Generate excel file

    oracle tutorial career
    3
    0 Votes
    3 Posts
    0 Views
    J
    Basic Steps 1. Create/find scheduler 2. Create SQL that gets the data 3. Create code the outputs the data 4. Put 1-3 together. Steps 1-3 are independent. They do NOT have anything to do with each other. Step 3 is the only one specific to Excel.
  • Regarding mdf file

    csharp tools database help question
    6
    0 Votes
    6 Posts
    0 Views
    L
    Yes. Backup the existing database, and restore[^] it. Keep in mind that this procedure will convert "older" database versions (backups from 2005) to the format of your server (2008R2). Bastard Programmer from Hell :suss:
  • please help me with sqlite3 problem.

    database help sqlite linux performance
    6
    0 Votes
    6 Posts
    0 Views
    M
    by the way, i closed the database after each opration.
  • Cannot Register New Server in SQL Server 2008

    database sql-server sysadmin
    9
    0 Votes
    9 Posts
    5 Views
    J
    Kujtim Hyseni wrote: And ... ? And what? You registered a server to which you do not have access. Thus you cannot start it. As to why you do not have access it could either be because of permissions or because it does not exist.
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    2 Posts
    0 Views
    L
    Why have you posted this in the Database forum? speaking as ...
  • Reg SSRS 2008

    sql-server announcement
    2
    0 Votes
    2 Posts
    0 Views
    L
    Same question as above. speaking as ...
  • EDm->LINQ->WCF data services?

    csharp database oracle wcf linq
    2
    0 Votes
    2 Posts
    0 Views
    M
    vkap wrote: displaying the data in to data services This is contradictory, a service does not display, that is a UI job, not a service job. You can use the WcFTestClient to log on to the service and execute the methods you have exposed to get the results! Never underestimate the power of human stupidity RAH
  • get list of connected users

    database sysadmin question sql-server
    4
    0 Votes
    4 Posts
    0 Views
    D
    Thanks David and Eddy. I got the solution. It is done by executing 'GRANT VIEW SERVER STATE TO [LOGIN]' at the server scope. It works now.
  • How to secure a database?

    database sql-server sysadmin security tutorial
    8
    0 Votes
    8 Posts
    0 Views
    J
    Why don't you just limit access? The database server should be on a secured box anyways and logins to that box should be limited to only a few people in the organization. All other access to the database are via login credentials.