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
    4 Posts
    0 Views
    Q
    In my opinion , if you can create log table in your database. A easy way is insert the sql into your log table. e.g. Create log table: CREATE TABLE SQLLOG_DEBUG ( SQL_LOG VARCHAR2(4000 BYTE) ) Insert the sql into your log table. INSERT INTO SQLLOG_DEBUG (SQL_LOG ) VALUES (ssql ) *This is just a sample, I didn't test the code. If the sql is big , you can change SQL_LOG's datatype into clob. You can also use DBMS_OUTPUT.PUT_LINE and redirect the output to a file. The following page shows how to do it. [stackoverflow.com]
  • Query numbering in groups in access database ?

    database sql-server com sysadmin help
    4
    0 Votes
    4 Posts
    6 Views
    CHill60C
    No - I cannot bypass the firewall using some dodgy download. What makes you think our corporate security is so weak it would allow me to do that :laugh: Why not just do what thousands of other members do - type in the details into a post?
  • MongoDB via WebAPI Question

    question csharp asp-net mongodb sysadmin
    8
    0 Votes
    8 Posts
    12 Views
    K
    It's a WPF app, which creates a new entity and sends it to the API. When the API call returns, I am now passsing back the Guid and assigning the new entity. Thanks If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
  • How to reach Outlook Support Number 1-888-410-9071 ?

    help com tutorial question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Outlook Support Number 1-888-410-9071| outlook help

    help com
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • MySql vs MariaDB

    mysql help announcement css sharepoint
    7
    0 Votes
    7 Posts
    13 Views
    J
    DerekTP123 wrote: rather than just a later version. It's a real shame, because 15 years ago when I first started using them I suspect that 15 years ago you also were different. So could be that they have gotten worse but could also be that you have become more discerning. Or a combination.
  • 0 Votes
    4 Posts
    7 Views
    J
    Perhaps you missed my point. You have a list of pointers. Nothing more. The pointer must be set to point to something. Where does that happen? normga wrote: the code always query mysql successful That doesn't mean anything. Code can run successfully, sometimes, even with uninitialized pointers. It depends on how the memory is laid down.
  • Best way to batchprocess a large update

    html com help tutorial question
    18
    0 Votes
    18 Posts
    22 Views
    realJSOPR
    That's something for our DBAs to worry about. :) ".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
  • 是是滴是滴是的是的是的是的

    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • What is an alias?

    question
    3
    0 Votes
    3 Posts
    5 Views
    realJSOPR
    It lets you replace [MyDB].[dbo].[MyTable] with a shorter name, such as a: SELECT a.* FROM [MyDB].[dbo].[MyTable] AS a You can also use the aliasiing feature on column names, like so: SELECT [MyReallyLongColumnName] AS ShorterName FROM [MyDB].[dbo].[MyTable] A simple google search will give you all the nuances regarding the use of aliasing in SQL Server (for columns, sometimes you should, sometimes you must, and sometimes you don't have to use aliasing. BTW, you generally alias table names when using join or merge. ".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
  • MongoDB Int Primary Key

    mongodb help question
    4
    0 Votes
    4 Posts
    6 Views
    J
    Kevin Marois wrote: So what if I created a PK table on the sever: In this scenario... (some caller) -> (app server) -> (database server) In the above the 'app server' is the 'client' for the 'database server' If you create the key on the 'app server' then you have the following choices (locking in your code has no impact on this.) 1. There can only be one server. 2. You will need to create/find a mechanism the correlates the id creation between multiple 'app server' instances.
  • MySQL

    mysql tutorial
    6
    0 Votes
    6 Posts
    17 Views
    L
    SQL Tutorial[^]
  • 0 Votes
    9 Posts
    13 Views
    S
    We cannot share same solution..this site for sharing our knowledge and experience to find best and alternate solution to reach OP's expectations.I always try to understand others i hope u too :-)
  • SQL Remote Connections

    database help sql-server sysadmin com
    7
    0 Votes
    7 Posts
    10 Views
    K
    Well, I have checked & rechecked all the settings.. Named Pipes s disabled everywhere that I can see. Still getting this error If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
  • 0 Votes
    4 Posts
    11 Views
    U
    it's right.Thank you,dude.The column 'contractNo' has null value.
  • Favour sought from a MySql expert

    question mysql com
    4
    0 Votes
    4 Posts
    15 Views
    L
    You still have options: - edit the question and add further information. - reply to the person(s) who have already responded with some feedback or requests for more assistance.
  • 0 Votes
    4 Posts
    9 Views
    L
    Maybe you should rewrite this query into its separate clauses so you can see the breaks more clearly. You have a number of parts where you are concatenating text and variable fields so it may be that you have unbalanced quote characters.
  • LinkedServer version

    database sharepoint sql-server sysadmin announcement
    2
    0 Votes
    2 Posts
    4 Views
    M
    Check that the ID on the ServerList table is the same as i. i will be 1 then 2 then 3 etc I bet the ID field in servertables does not match. Try using a cursor and looping through the servertable. Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP
  • 0 Votes
    4 Posts
    6 Views
    CHill60C
    It's always easier to help sort problems out if you also supply some sample data and expected results. You are using the TEXT datatype for some key data items - this allows up to 2GB of text and is the wrong choice for things like names, emails etc. You also cannot compare or sort easily. Use Varchar instead e.g. VARCHAR(MAX) (Although that is also overkill, I usually use varchar(50)) You are using WHERE when you should be using CASE WHEN ... END
  • 0 Votes
    5 Posts
    9 Views
    U
    from the original data I created the result, if the contract in the month has LOAIHD = "FBAN" and between (#01/01/2019# and #31/01/2019#) then [BOOL] = 1 else [BOOL = 0, I will describe the condition of [BOOL] in C# code [CODE] for (int i = 0; i < [Original data].Count; i++) { bool BOOLEAN = 0; string SOHD = ""; if([NGAYGIAO].[i]>=#1/1/2019# && [NGAYGIAO].[i] <=#1/31/2019#) //dd/MM/yyyy { for (int j = 0; j < [Original data].Count; j++) { if([LOAIHD].[j] == "FBAN") { BOOLEAN = 1; SOHD = [Original data].[HD].[j]; } } } if(SOHD == [Original data].[HD].[i] && SOHD != "") { [Result].[BOOL].[i] = BOOLEAN; } } [/CODE]