Friday, 30 September 2022

sql remove not existing ids in table one

How to Delete Rows That do not Exist in Another Table


 select a.orderid from web.orderHeader a

 WHERE web.orderHeader.orderid NOT IN (SELECT f.orderid 

                        FROM web.orderdetail f)

Using NOT IN:

DELETE FROM orderHeader
 WHERE orderid NOT IN (SELECT f.orderid 
                        FROM orderdetail f)

Using NOT EXISTS:

DELETE FROM orderHeader
 WHERE NOT EXISTS(SELECT NULL
                    FROM orderdetail f
WHERE f.id = fileid)

Monday, 26 September 2022

azure Blob Storage upload video

 

1.issue is the azure upload file container is like below

2.







2. upload code to azure blob storage we need to put we need follow the above screen shot 
and then we can access the blob storage  using above we need to create token and update it accordingly
in angular then we can upload it azure blob storage without backene
here is the angular code Link










Friday, 16 September 2022

matdialog after closed pass data

 dialogRef.afterClosed().subscribe(result => {

      if(result.event == 'Add'){
        this.addRowData(result.data);
      }else if(result.event == 'Update'){
        this.updateRowData(result.data);
      }else if(result.event == 'Delete'){
        this.deleteRowData(result.data);
      }
    });
sedn data after dialog ref close
>>try comapare two arrays based on key value

Friday, 9 September 2022

My FIrst Python Project

 To create Python

1.create enviornment

2.install flask

2.install flaskjson

2.install flasksqlalcahmey

4.run cmds 

  1.flask run to run in local server

5.create dabase locally

i.from app import db

ii.db.create_all()
iii.from app import Employee
iv.emp = Employee(firstname="pk", lastname="p", gender="f", salary=123)
v.db.session.add(emp)
vi. db.session.commit()
vii.emp = Employee(firstname="pk", lastname="p", gender="f", salary=123)
viii. db.session.add(emp)
xi.db.session.commit()
x Employee.query.all()


sample git hub code 


Thursday, 8 September 2022

python sql conn

 


in pycharm unable to connect to the sql so suggeted to in sql configuration manager

selecet sql server network configuration select protocols

>>enable tcp/ip true


Saturday, 3 September 2022

 angular cli cmd in local getting issue that when we give cmd it is opening with select file to run chrome,notepad... to resolve this issue goto the npm path and dlt ng files npm i angular cli again

c#

 https://github.com/dcyuksel/Result