Skip to content
Code Project
CODE PROJECT For Those Who Code

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
  • parent and child interbase query

    database help tutorial question
    13
    0 Votes
    13 Posts
    1 Views
    P
    i cant belive the result was under my nose all the time and i didnt see it! :doh: thank you sebastian... ill never forget your support! if u got curious ... the thing i wanted is (you type in google fetch parent child tables interbase) you will get the title article (fetch parent child... uppercased u enter it and you will find what i wanted exactly..) thank you so much. hop this works.becos it says oracle ... thank you again :)
  • regarding foreignkey data

    help
    6
    0 Votes
    6 Posts
    1 Views
    K
    ok thanks for ur advice
  • Sql query problem

    database help question
    2
    0 Votes
    2 Posts
    0 Views
    I
    SELECT person FROM [tablename] GROUP BY Person HAVING COUNT(bar) > 1
  • CHECKING NULL VALUES

    database help
    3
    0 Votes
    3 Posts
    1 Views
    A
    Whats wrong with just saying where dob is null ? (allowing for your decryption) Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP
  • SQL:what is wrong in following query

    database question
    5
    0 Votes
    5 Posts
    1 Views
    A
    You cannot use an IN with a variable. Either use dynamic sql or, my preferred method, use a function to split the list into a table variable and join on that. A quick google will give you examples, but here is a starter CREATE FUNCTION [dbo].[fn_DelimitedSplit] ( @TextToSplit VARCHAR(8000), @Delimiter VARCHAR(255) ) RETURNS @SplitKeyword TABLE (Keyword VARCHAR(8000),seq int identity) AS BEGIN DECLARE @Word VARCHAR(255) WHILE (CHARINDEX(@Delimiter, @TextToSplit, 1)>0) BEGIN SET @Word = SUBSTRING(@TextToSplit, 1 , CHARINDEX(@Delimiter, @TextToSplit, 1) - 1) SET @TextToSplit = SUBSTRING(@TextToSplit, CHARINDEX(@Delimiter, @TextToSplit, 1) + 1, LEN(@TextToSplit)) INSERT INTO @SplitKeyword(Keyword) VALUES(@Word) END INSERT INTO @SplitKeyword(Keyword) VALUES(@TextToSplit) return END Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP
  • xml schema

    database xml sql-server sysadmin json
    2
    0 Votes
    2 Posts
    1 Views
    H
    Judging by the example on MSDN here[^], you have missed out a whole chunk: <xsd:schema targetNamespace="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions" xmlns ="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions" Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
  • Creating the XML Schema

    database xml sql-server sysadmin question
    2
    0 Votes
    2 Posts
    1 Views
    D
    If you load the data into a datatable, you can invoke a method to create your scehema. Dim dt As DataTable dt.WriteXmlSchema() Maybe that will help.
  • ADO.NET / Update Column in memory

    question csharp database performance announcement
    3
    0 Votes
    3 Posts
    1 Views
    S
    It works fine, thanks.
  • 0 Votes
    5 Posts
    1 Views
    N
    ashwath1979 wrote: Can you please give the complete code snippet so that i can understand fully. That is laziness. What have you tried and where you are stuck? Navaneeth How to use google | Ask smart questions
  • Database design questions

    question csharp database mysql design
    6
    0 Votes
    6 Posts
    1 Views
    N
    Saksida Bojan wrote: What is diffrent by Windows Service and Web service? Windows services are normal applications that runs all the time and controlled by a service manager. It needs to be installed using installutil utility. On the other hand, web services follow request/response architecture. It resided on a server and serves requests. Communication is done on XML format following SOAP protocol. Saksida Bojan wrote: Can Windows Service uses protocol such as TCP or UDP? Yes. Navaneeth How to use google | Ask smart questions
  • Storing data which in the form of a list to database.

    question database
    5
    0 Votes
    5 Posts
    1 Views
    U
    Alright Thanks for your time. Is there anybody who could help me with my problem. -UdayKiran
  • Merging multi results into one row

    database sql-server help tutorial question
    4
    0 Votes
    4 Posts
    1 Views
    W
    Yes i will consider that :) Havent thought about it that way.
  • Transferring SQL Express data

    database question
    4
    0 Votes
    4 Posts
    1 Views
    H
    Coincidentally I have just found this[^] article on Database Journal about attaching Databases. Just in case you aren't aware of the method. Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
  • Found some strange code. [moved]

    question
    2
    0 Votes
    2 Posts
    1 Views
    P
    Wrong forum; try "general database".
  • 0 Votes
    5 Posts
    1 Views
    A
    well, i have done this which returns the requirement, but only it does not returns parent tables first then child tables. would u help me to return parent tables first than child tables. select distinct(t.name),t.[object_id] from sys.tables t left join sys.foreign_keys k on t.object_id=k.parent_object_id where t.[type]='U' and t.is_ms_shipped=0 and t.[name] not like 'asp%' and t.[name] not like 'sys%' order by t.[name] desc Abdul Rahaman Hamidy Database Developer Kabul, Afghanistan
  • Oracle Equalent for Systypes and Syscolumns...

    question oracle
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • SQL:Find one primary key of each duplicate records

    database tutorial
    9
    0 Votes
    9 Posts
    1 Views
    A
    So does my test script work for you? Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP
  • About the SQL Execution Plan

    question database tutorial
    4
    0 Votes
    4 Posts
    1 Views
    D
    I agree. I typically use the execution plan to make sure I can reduce the number of I/O's; no full table scans ... It has been my experience that if you reduce (or limit) the I/O's your application will respond quickly. Regarding, timing of SQL: Why don't you build your own timer logic and try various SQL statements out? Keep it simple, something like this: Begin timer1 Execute SQL1 End timer1 Begin timer2 Execute SQL2 End timer2 Now check which timer is the smallest. You will have to collect these statistics multiple times to ensure that you are not getting skewed results because the data happens to be in cache.
  • LIKE Predicate

    question database regex help tutorial
    10
    0 Votes
    10 Posts
    1 Views
    M
    Not a problem Never underestimate the power of human stupidity RAH
  • Sql Problem

    database help tutorial
    4
    0 Votes
    4 Posts
    0 Views
    J
    As interesting as your data is, what is your query? "My interest is in the future because I'm going to spend the rest of my life there." - Charles F. Kettering