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
  • Sort GetChildRow datarow array

    database data-structures help question
    4
    0 Votes
    4 Posts
    0 Views
    M
    Using the array of datarows is wrong, so you will benefit from the refactor :) You could sort the datarows BEFORE you load them into the array! Never underestimate the power of human stupidity RAH
  • Need to Optimize this Query

    database tutorial code-review learning
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • SQL server query

    database sql-server sysadmin xml help
    3
    0 Votes
    3 Posts
    0 Views
    R
    Try this DECLARE @T TABLE(ID_NO INT IDENTITY,FIRST_NAME VARCHAR(50), LAST_NAME VARCHAR(50)) INSERT INTO @T VALUES('X','ABC'),('Y','ABC'),('M','PQR'),('N','PQR') --SELECT * FROM @T ;WITH CTE AS( SELECT Rn = ROW_NUMBER() OVER(PARTITION BY t2.LAST_NAME ORDER BY (SELECT 1)) ,t2.LAST_NAME + ',' + STUFF(( SELECT '-' + t1.FIRST_NAME FROM @T t1 WHERE t1.LAST_NAME = t2.LAST_NAME FOR XML PATH(''),TYPE) .value('.','NVARCHAR(MAX)'),1,1,'')AS Concat_FirstName FROM @T t2 ) SELECT STUFF(( SELECT '/' + c1.Concat_FirstName FROM CTE c1 WHERE c1.Rn = c2.Rn FOR XML PATH(''),TYPE) .value('.','NVARCHAR(MAX)'),1,1,'') AS Concat_FirstName FROM CTE c2 WHERE Rn= 1 GROUP BY c2.Rn Result Concat_FirstName ABC,X-Y/PQR,M-N Hope this helps
  • 0 Votes
    5 Posts
    1 Views
    W
    You could always add 0.0005 to your numbers before saving them... ;P
  • Timeline for Work Completion

    csharp database sql-server asp-net sysadmin
    2
    0 Votes
    2 Posts
    0 Views
    CHill60C
    That really is like asking "how long is a piece of string?" :-D Only you will know if you can actually achieve this timeline. Some observations from my own experiences though Step 1 - if you get "awkward" stakeholders this step could well take longer than 4 days (actual time spent or elapsed!) Step 2 - seems a little long as you appear to already have an idea of the tables required - if you're including all of the admin hoops to jump through with DBA's or other control mechanisms I would make it clear in the estimate Step 14 - seems a bit light, but some of the builds do seem a bit long. Step 15 - see my earlier comments about stakeholders! I've never run UAT in less than 3 days (and even that was a struggle) If this timeline is going out to the stakeholders double everything and make it clear whether or not this is a "working days elapsed" timeline or a "working hours spent" Under promise and over deliver ;)
  • datagrid code

    help tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    CHill60C
    Not at all clear what your problem is. Try researching some codeproject articles[^] then come back if you have a specific problem
  • HOW TO COPY DBF Files in VB.NET

    help csharp database tutorial
    4
    0 Votes
    4 Posts
    0 Views
    S
    I am using Following code to copy the DBF file from Original location to mylocation Dim di As New IO.DirectoryInfo(SourceFolderPath) Dim tempname As String Dim diar1 As IO.FileInfo() = di.GetFiles("*.DBF") Dim dra As IO.FileInfo 'list the names of all files in the specified directory For Each dra In diar1 tempname = dra.ToString Do Until FileInUse(dra.FullName) = False ''Do nothing Until File Is busy Loop ''once file become free then copy the file dra.CopyTo(destpath) Next
  • Database relationship for tables

    database question
    3
    0 Votes
    3 Posts
    0 Views
    N
    There are definitely other tables in the mix, as is clear from the License table. I suspect that you can walk a relationship between those. All of those ID fields point to something, chase them down. My suggested starting points are LICENSETYPEID, LICENSESTATUSID, and LICENSECLASSIFICATIONID. Keep in mind that you may need to join on GLOBALENTITYID to get useful results.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • MSaccess query to access random value from database

    database java html css tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Music Database

    database learning design tutorial
    2
    0 Votes
    2 Posts
    0 Views
    L
    Well, as it is a school assignment you are expected to do the work. However, there are lots of samples of website projects that you can find by doing a Google search, or look at some of the articles referred to at Beginner's Walk - Web Development[^]. The CodeProject articles section also has many database articles.
  • 0 Votes
    3 Posts
    0 Views
    S
    Ahhh! Brilliant again Richard. Thanks as always. Very much appreciated.
  • 0 Votes
    5 Posts
    1 Views
    D
    It is not possible to do a backup of full text catalog, so if you use it, make sure to have the tables and the model finished, or almost finished. Because, if you do changes (to add a column, create a new foreign key...), you will need to create the full text catalog and the indexes over and over again. Despite to everything, I recommend the use of full text catalog in some cases, because his use increase the speed of the querys with filters, it is faster than the use of LIKE in most cases. But the maintenance is bigger.
  • postgresql database issues

    database help postgresql tutorial announcement
    28
    0 Votes
    28 Posts
    2 Views
    U
    thanks.... finally i achieved my requirement.
  • 0 Votes
    11 Posts
    0 Views
    H
    Define BIG Construction.... How much data is involved (written to and read from)? Mainly simple tables with simple types of bugger and heavier types? You like to encode/decode JSON all the time? Which requirements are wanted? In Word you can only store 2 bytes. That is why I use Writer.
  • Move GROUP_CONCAT's comma values to columns

    com question announcement
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Migrate data from Mysql Server to Sql Server

    database mysql sql-server sysadmin
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    9 Posts
    0 Views
    C
    It's early here. :-D Mongo: Mongo only pawn... in game of life.
  • 0 Votes
    5 Posts
    1 Views
    Kornfeld Eliyahu PeterK
    SQL does not! stores information about the person (user) modified any of its object, the only information stored is the last date it modified... You may look into the trc files of the default trace (you may need to enable it), but it is good for a short time as it being overwritten periodically... Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
  • MemSQL.. Explored yet?

    question
    5
    0 Votes
    5 Posts
    0 Views
    J
    Schatak wrote: seems to be good and new thing Pretty sure when new things stop showing up in computing then people won't be doing computing any more. So new doesn't mean much. The real question does it serve a real need significantly better than some older technology. Must be significant otherwise the learning time and the problems due to learning will not be an effective trade off. And the vast majority of the time for any really "new" idiom the answer is no. So based on that one shouldn't look for new technologies but rather look for solutions to real problems. For example a real problem might be that an existing file based database using expertly created caching and expertly created database design fails to meet real performance needs. This would be versus situations like the following - My 'database' is slow, when no actual profiling has been done at all. (I don't even know what profiling is much less creating a simulation of actual production traffic.) - My database is slow but I don't have any idea how databases work. - I don't like SQL and consequently all my SQL ends up being written like it didn't exist. - I don't even know what caching strategies are - I read about this cool tool and I want to base the entire future of a company for the next 10 years on it just so I can play with it. - As a developer I need to restore the database 20 times a day and it just takes too long so the database should be replaced even though there is no problem with performance in production.