Please, why I got this error(SQL Error: ORA-00907: missing right parenthesis ) whats wrong in my code? CREATE TABLE DomeniuAB(ID_DOMAB NUMBER(10) constraint ID_DOMAB_PK PRIMARY KEY , DENUMIRE VARCHAR2(20) NOT NULL, DETALII VARCHAR2(20) NOT NULL, ISBNAB_CarteAB VARCHAR2(15), CONSTRAINT ISBNAB_FK FOREIGN KEY (ISBNAB_CarteAB) REFERENCES CarteAB(ISBNAB), CNPAB_AutorAB NUMBER(10), CONSTRAINT CNPAB_FK FOREING KEY (CNPAB_AutorAB) REFERENCES AutorAB(CNPAB));

Member Avatar
Member Avatar
+0 forum 3

Hi there here is a stupid question. I have created an update statement that updates a table that has null user id using a name as the identifier: [CODE] UPDATE dembel SET userid = 8908 WHERE [Name] = 'o'reily' [/CODE] However the the name already contains an apostrophe which causes a problem in sql, How can i write the name so that the apostrophe is part of the string itself.

Member Avatar
Member Avatar
+0 forum 4

Hi, I need help to create a relational database for shop.The database should contain a column for barcode in order to register items and also to read details of items using barcode scanner.Besides this database will contain tables for performing all operations for shopping store items what are those operations I don,t know but I need it for shopping store. Thanks.

Member Avatar
Member Avatar
+0 forum 2

I have a sp which has multiple resultset.I need to create another procedure which should execute the second resultset of 1st sp for ex SP1 gives two resultset I need to write sp2 which uses only the second resulset

Member Avatar
+0 forum 0

I have a sp which has multiple resultset.I need to create another procedure which should execute the second resultset of 1st sp for ex SP1 gives two resultset I need to write sp2 which uses only the second resulset

Member Avatar
+0 forum 0

Show error when I login to the SQL server management. First, I change the server name. Second restart the server/1st stop services the start services. Then I check the server name SELECT @@servername AS 'ServerName' using this line the show new change server name. Then I closed the window of SQL server then open it and type the new change server but show error. Please help me.... I use SQL Server 2008 r2. Windows authentication [Click Here](https://ibb.co/mzL2BdC) SELECT HOST_NAME() AS 'host_name()', @@servername AS 'ServerName\InstanceName', SERVERPROPERTY('servername') AS 'ServerName', SERVERPROPERTY('machinename') AS 'Windows_Name', SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS 'NetBIOS_Name', SERVERPROPERTY('instanceName') AS 'InstanceName', SERVERPROPERTY('IsClustered') AS 'IsClustered' EXEC …

Member Avatar
+0 forum 0

I want to calculate the total conditional in the month but remove the records that are not the same month and not the same year, the condition that eliminates the view on the sql access because the result is true or false in the excel file http://www.mediafire.com/file/kq2mr2v6px1uxan/exercise.rar DOANHTHU2: Sum(IIf(Not IsNull([DONGIA]),[SOLUONG]*([DONGIA]/1000000),[SOLUONG]*([DONGIATT]/1000000))) DOANHTHU2: Sum(IIf(Not IsNull([DONGIA]) AND (SELECT COUNT(*) AS DEM FROM HDMUABAN WHERE (((HDMUABAN.HD)='M1101') AND ((HDMUABAN.LOAIHD)='FBAN') AND ((Month([NGAYGIAO]))=1) AND ((Year([NGAYGIAO]))=2019)) GROUP BY HDMUABAN.HD, HDMUABAN.NGAYGIAO, HDMUABAN.LOAIHD) AS NUM <=0,[SOLUONG]*([DONGIA]/1000000),[SOLUONG]*([DONGIATT]/1000000))) TONGDOANHTHU2: IIf(Not IsNull([DOANHTHU2]) And Not IsNull([BSLN]),[DOANHTHU2]+[BSLN],IIf(IsNull([DOANHTHU2]) And Not IsNull([BSLN]),[BSLN],[DOANHTHU2])) My example only removed one record, I designed the problem of removing many records if …

Member Avatar
+0 forum 0

All Time Show Null value Please help me what is the wrong in my code declare @mxdbvlu int declare @dbvlunm int set @mxdbvlu= (select max(Database_name) from TBL_FY_SELECT_1) if @mxdbvlu = null set @dbvlunm=1000 else set @dbvlunm=sum(@mxdbvlu+1) select @dbvlunm,@mxdbvlu

Member Avatar
Member Avatar
+0 forum 1

Sir I have this data ![Untitledg_jygukg.png](/attachments/large/4/e33bd064d12c1ff9b76646dc9376d4de.png) Group by hours Or First value of every hour Please help

Member Avatar
Member Avatar
+0 forum 2

A long shot I know but a colleague has left, leaving behind a couple of access databases that query each other and a sql database, unfortunately one of the databases querys now takes a long time to run to the point that the excel report calling the query timeouts. is it easy for any body to see what might cause it to take so long to run or how i could possible speed it up the SQL for the query is attached below SELECT [Machine Rates].Group, [SFDC time transactions log].Machine, Calendar.FFPDATE_0 AS [Date], [SFDC time transactions log].TranTime, [SFDC time transactions …

Member Avatar
Member Avatar
+0 forum 1

I have a table that contains some cubes with servers and active status (see attached image): note: CUBE1 is repeated intentionally. The idea is the same cube is getting synced from the same server 1 as a data source (process_server) onto different target servers (query_server; say server2 is in region A and server 3 is in region B). The way the environment is set up is both servers have to be active/active status (meaning TRUE) except for some additional test cases, i am setting to false sometimes one or the other. I have the following script now calling the cube …

Member Avatar
Member Avatar
+0 forum 2

How to copy a store procedure one to another database in same server I work on a project. I want copy all or single store procedure from old financial year **db_17_18** to new financial year **db_18_19** I want to do it using sql server command. i try it but showing error Please help me.... i used : SQL_Server 2008 r2 server name : shop04 **What I have tried:** **try 1** select * into DB_18_19.dbo.P_Add_FY_Data.procedures from DB_17_18.P_Add_FY_Data.procedures WHERE type_desc='SQL_STORED_PROCEDURE' **Error1 :** Msg 117, Level 15, State 1, Line 1 The object name 'DB_18_19.dbo.P_Add_FY_Data.procedures' contains more than the maximum number of prefixes. …

Member Avatar
Member Avatar
+0 forum 2

Hi Guys! I have a website but we don't host in GoDaddy or any hosting website, because we use SQL database. And we have a large database that we are using , the website is for productions. We store a lot of data. We use the IP address because we port forward it so that we can use it anywhere. Now, we are worried because we are exposing our IP address outside, and it might be the reason for hackers or any attacks to come to us. Can you help me or give me an Idea how can I change …

Member Avatar
Member Avatar
+0 forum 15

automatically duplicate rows in sql server 2008 r2 select query i have two table name 1) tbl_Stock_Journal 2) tbl_Stock_Journal_Details i run a select query with where condition i have 5 data in table1 and in table 2 have 3 data when i run the query result is showing 15 row the query show on date wise i want to maximum data show and if other table in same date have no number of data then show blank or null please help me..... ALter proc P_GetStockJournalRPT -- 'all', 'all','2018-07-10' , '2018-07-10' @SJItmID varchar (100) , @SJDItmID varchar (100) , @Sdate date, …

Member Avatar
Member Avatar
+0 forum 4

I am trying to select all rows from all tables in the database when a column equal a given name. I have like many tables with same structure and columns. I have written this piece of code but it throws an error. SELECT GROUP_CONCAT(qry SEPARATOR ' UNION ') INTO @sql FROM ( SELECT CONCAT('SELECT * FROM `',table_name,'` where Name like ''','sally%','''') qry FROM ( SELECT distinct table_name FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = 'db_customers' AND column_name LIKE 'Name' ) A ) B; PREPARE s FROM @sql; EXECUTE s; DEALLOCATE PREPARE s; This is the error I am getting. I am aware …

Member Avatar
Member Avatar
+0 forum 3

This is surprisingly difficult. Consider it a snippet. Deletes all tables from a sql server schema. Useful for those times on your dev machine where you need to tear down all the cruft that has built up on your server due to refactoring of object relationally mapped tables. --Author: Cameron Block DECLARE @SCHEMA VARCHAR(50) = 'cblock'; DECLARE @LOOP_PREDICATE INT = 1; WHILE (@LOOP_PREDICATE > 0) BEGIN DECLARE CUR_PARENTS CURSOR FOR select referenced_object_id "REF_ID", T.name "TABLE", S.name "SCHEMA" from sys.foreign_keys FK JOIN SYS.TABLES T ON T.object_id = FK.referenced_object_id JOIN sys.schemas s ON t.[schema_id] = s.[schema_id] JOIN INFORMATION_SCHEMA.TABLES I ON i.TABLE_NAME = …

Member Avatar
Member Avatar
+1 forum 2

hello i have oracle database 10g as my sql server. i didnt use it for over a year and now when i open it the page just closes without any warning or error after entering the username and password. i reinstalled it and the problem is still there. i can't find why it happened and how to solve it. please do help me.

Member Avatar
Member Avatar
+0 forum 1

Hi, I have a SQL Server (RSQL) and a SSAS Server(RSSAS). RSQL has a linked server to RSSAS, naming [LinkedCube] Here is a screenshot of my Linked Server Properties I use SSMS to connect to RSQL and then run a query that returns data from SSAS using linked server. The result set contains 100,000 rows and it took 17 seconds to return data completely. The Profiler said that MDX query duration is about 3 seconds, so it took 14 seconds to return data. The network connection has a maximum transfer rate at 100MB/sec, so 14 seconds is not acceptable. Do …

Member Avatar
+0 forum 0

I am a beginner in this field and I have some mistakes in ((codes)) who can tell me what my mistakes. Physical model (1) Employee (SSN, Salary, Phone) CREATE TABLE Employee (SSN integer PRIMRY KEY, Salary integer, phone integer); Department(DNO, dname, Budget, ssn_employee) CREATE TABLE Department(DNO integer, dname varchar(10 )Budget Integer, ssn_employee int, CONSTRAINT pk_Department PRIMARY KEY (DNO) ,FOREIGN KEY (ssn_employee) REFERENCES employee(ssn_employee) ON UPDATE CASCADE ON DELETE SET NULL ); Child(IDChild, Name, Age, ssn_employee) CREATE TABLE Child( IDChild Integer, Name varchar(40), Age Integer, ssn_employee Integer CONSTRAINT pk_Child PRIMARY KEY (IDChild), FOREIGN KEY (ssn_employee) REFERENCES employee(ssn_employee) ON UPDATE CASCADE ON …

Member Avatar
Member Avatar
+0 forum 4

I am having a table with nvarchar feild in which values are entered like 1 4 8 25 I want a sql query to find the missing sequence of number in the above series... Thanks in advance...

Member Avatar
Member Avatar
+0 forum 5

Hi, I am following a walkthrough of [Entity Framework Code First to a New Database](https://msdn.microsoft.com/en-us/library/jj193542(v=vs.113).aspx) Everything appears to go as expected right through to the end of step 4, where it says "We can now inspect the schema that Code First created." The database shows up under data connections in server explorer, (host\sqlexpress.CodeFirstNewDatabaseSample.BloggingContext.dbo) but there are no tables in it. What might I have done wrong? Thanks for reading.

Member Avatar
+0 forum 0

I am a beginner practicing how to create tables on SQL Here is what I've done: Create Table PO (Order_id int primary key, order_date date, customer varchar(1000)); Create table PO_Line_Item (Order_id int not null, Line_number int not null, Product varchar (30), Unit_Price decimal (10,2), Qty decimal (10,2), Tax decimal(10,2)); When I press execute it appeared "there is already an object named 'PO' in the database. What have I done wrong?? If any one have any ideas pls let me know

Member Avatar
Member Avatar
+0 forum 1

**problem** How to get cost per hotel and flight then add it in duration cost table based on flight date automatically . **Details** suppose i write flight date 26/07/2017 alexia 8days 04/08/2017 it must automatically get cost from hotel price table and price from flight then add it in duration cost table so that what query i write to get cost per hotel and flight when write flight date then insert it to duration cost table my database CREATE TABLE program( ProgramID int primary key not null, ProgramName varchar(30) ) GO insert into program values(1,'Alexia'),(2,'Amon'),(3,'Sfinx') GO CREATE TABLE ProgramDuration( DurationNo …

Member Avatar
Member Avatar
+0 forum 1

To all database genius out there, I hope you can help me with this error I encountered when importing excel file to SQL Server 2005. This is the error: [CODE]Executing (Error) Messages Error 0xc020901c: Data Flow Task 1: There was an error with output column "Description" (21) on output "Excel Source Output" (9). The column status returned was: "Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard) Error 0xc020902a: Data Flow Task 1: The "output column "Description" (21)" failed because truncation occurred, and the truncation row disposition …

Member Avatar
Member Avatar
+0 forum 14

I am trying to cast/ convert varchar to a numeric value. I have done this succesfuly when I eval the lower range, however I get an error when I do the upper range. this is my evaluation section that works. isnull(cast(measurmentdata.measvalue as numeric),0) < productinfo.lowerrange however when I try to test to see if it is above the upper range it throws an error isnull(cast(measurmentdata.measvalue as numeric),0) > productinfo.upperrange I have tried not between as well. while it does not return any errors it does not correctly test for > or < isnull(cast(measurmentdata.measvalue as numeric),0) not between productinfo.lowerrange and productinfo.upperrange

Member Avatar
Member Avatar
+0 forum 3

Hi friends , I have three table Countdown, Walk, Bon de reception The Id_marche is a foreign key in the countdown table and The Receipt table contains the Id_marche I want to insert in recordings in the counting table which contains Amount TTC so to calculate Amount TTC = TVA* Amount HT I have the TVA AND the Amount HT in the voucher table of reception I could not create a request to insert and calculate the amount TTC I do not know is what I described well my condition And thank you for you in advance

Member Avatar
Member Avatar
+0 forum 1

Hi, i have a db system where i fetch results from two tables. A user and transaction table. In the transaction table i have two columns which are sender and reciver id which refence in the user table. how do i get a sender name and receiver name in a query. Thank you.

Member Avatar
Member Avatar
+0 forum 1

I would like to show data in a table in SQL server database to Gridview in ASP.NET project, but the gridview shows nothing. Could you please help me to find where is the problem, and how to fix it. Thanks Here is my code: protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { string cs = ConfigurationManager.ConnectionStrings["SampleDBCS"].ConnectionString; SqlConnection con = new SqlConnection(cs); SqlCommand cmd = new SqlCommand("select * from newexample", con); DataTable dt = new DataTable(); dt.Columns.Add("col0"); dt.Columns.Add("col1"); dt.Columns.Add("col2"); con.Open(); SqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { DataRow dr = dt.NewRow(); dr["col0"] = rdr["col0"]; dr["col1"] = rdr["col1"]; dr["col2"] = …

Member Avatar
Member Avatar
+0 forum 1

i have create a webpage using visual studio 2017. now how could i link this to database that i have created in mysql.?

Member Avatar
Member Avatar
+0 forum 1

hello, i have one table in sql server and i made a form to editing this table from. so when i click edit in the table .. it takes me to the editing form with the chosen id .. what i need is to show all other feildes in the form that related to the chosen id ???!! any help ?

Member Avatar
+0 forum 0

The End.