T-SQL Script to Generate Select Query for Tables in List

Stängt Publicerat 1 år sedan Betalades vid leverans
Stängt Betalades vid leverans

T-SQL to generate select query for tables in a list TABLE_LIST. We have a list of 50 tables to insert. The first column is identity. The script will be able to generate the select statements for all tables in a list TABLE_LIST. The insert statement will need to have the table name in the from statement and the IDNUM in the where statement. Exclude the identity column from the Select Statements. One line per insert statement.

TABLE_LIST

TABLE_NAME, IDNUM

table1, 11112

table2, 11113

.

.

.

table50, 11160

Examples Insert Statements to generate

SELECT IDNUM,c1,c2,c3, c3,c5,c6,c7 FROM table1 WHERE IDNUM = 11112

SELECT IDNUM,c1,c2,c3, c3,c5 FROM table2 WHERE IDNUM = 11113

SELECT IDNUM,c1,c2,c3, c3,c5 FROM table50 WHERE IDNUM = 11160

table1

columns

i1 identity

IDNUM

c1

c2

c3

c3

c5

c6

c7

table2

columns

i1 identity

IDNUM

c1

c2

c3

c3

c5

Query Results

Select * from table 1

i1,IDNUM,c1,c2,c3, c3,c5,c6,c7 (Table Columns)

1,11111, 1, 2, 3, 4, 5, a, b

2,11111, 1, 2, 3, 4, 1, f, b

3,11111, 1, 2, 4, 4, 5, a, f

4,11112, 4, 5, 6, 7, 6, c, d

5,11112, 4, 5, 6, 7, 6, c, e

Select * from table 2

IDNUM,c1,c2,c3, c3,c5 (Table Columns)

1,11111, 1, 2, 3, e, f

2,11111, 1, 1, 3, e, g

3,11112, 4, 5, 6, g, f

4,11112, 4, 5, 3, g, j

Confidentiality.

a) No Use. Recipient agrees not to use the Confidential Information in any way, or to manufacture or test any product embodying Confidential Information, except for the purpose set forth above.

b) No Disclosure. Recipient agrees to use its best efforts to prevent and protect the Confidential Information, or any part thereof, from disclosure to any person other than Recipient's employees having a need for disclosure in connection with Recipient's authorized use of the Confidential Information.

c) Protection of Secrecy. Recipient agrees to take all steps reasonably necessary to protect the secrecy of the Confidential Information, and to prevent the Confidential Information from falling into the public domain or into the possession of unauthorized persons.

d) Scope. The scope of Confidentiality is deemed to be in all contracts present past and future with the Parties to this request

SQL Microsoft SQL Server T-SQL (Transact Structures Query Language)

Projekt-id: #34678309

About the project

16 offerter Distansprojekt Aktivt 1 år sedan

16 frilansare har lagt bud på i genomsnitt $31 för det här jobbet

eduardoherreral4

Hi I have read your description carefully. ⭐ I have rich experiences in TSQL, MySQL, MS SQL, database, data entry. ⭐ I worked on many similar projects. I can guarantee the quality of the job. Please kindly message me. Mer

$20 USD inom 1 dag
(13 omdömen)
4.8
goswamiarpit475

hello, I have 10+ years of experience in windows application and database development. i read the problem statement and i am sure that i can write a sql query that will select data from multiple tables based on ids. ca Mer

$20 USD inom 7 dagar
(18 omdömen)
4.8
merinsinha

Hello sir I have read your job details. I have 6+ years experience as a SQL, T-SQL Developer. I have already done so many projects till now. I have the right skills to work on this assignment ..I am ready to start the Mer

$30 USD inom 1 dag
(27 omdömen)
4.1
CourserXu

Hello there, I have read your requirements and am confident I am the right candidate for the job. Among other things, I have over ten years of experience in Oracle PLSQL, PostgreSQL, MySQL, MS SQL, and others. Furtherm Mer

$20 USD inom 7 dagar
(5 omdömen)
3.8
ddtran305

Hi, I have full experience in SQL Projects. And I've already made complete SQL Projects, so they gave good satisfaction to my hires. I have gone through your requirements and confident enough to solve your problem in Mer

$15 USD inom 3 dagar
(1 omdöme)
2.0
ayesharifatmed

Hello There! This is Ayesha Siddiqua. Nice to meet with you. I am an M.B.B.S doctor. I have completed my graduation from North Bengal Medical College under Rajshahi University. A versatile and professional Web & Mob Mer

$30 USD inom 1 dag
(1 omdöme)
1.1
EjazFreeLancer

Hello! I am expert and professional in this work, and I have read all your details. I will do work on your project within low price, unlimited revisions. Give me this project and get extraordinary and 100% work. Thanks Mer

$20 USD inom 7 dagar
(0 omdömen)
0.0
MohsinRauf81Pk

Hi, After reading the detail of your task, I submit my bid on the project, with complete solution in the form of SQL script to fulfill the project requirement/result. Hope you send me the further detail of the project.

$30 USD inom 7 dagar
(0 omdömen)
0.0
FarruMa

Lets connect on call, I will do this work right away. I am professionally a database expert and can surely help you with this. Best Regards, Farhan

$30 USD inom 1 dag
(0 omdömen)
0.0
robertroller

Hello, will create a script to solve your problem. Solution will be made within 24 hours of contract. Best regards Robert Roller

$100 USD inom 7 dagar
(0 omdömen)
0.0
surendrarathore6

Hi, I would love to be your freelance writer and help you execute your T-SQL Script I am a beginer. but don't worry i will work hard please give me one chance I can complete 1,000-word articles with a 2-day turnarou Mer

$20 USD inom 1 dag
(0 omdömen)
0.0
Manjunathsaraf

• Over 3.6 years of IT experience in Microsoft SQL server 2012 & 2016 in development environment on varies business domains like health care & sales • Well experience on all type of joins, set operators , Table varia Mer

$20 USD inom 2 dagar
(0 omdömen)
0.0
vignetha

Hi Am vignetha I am Happy to help you. I have 4 yrs of online tutoring experience in SQL using oracle,mysql,sqlserver, SQl lite, postgress . I have experience in  designing the database, and then writing the sql comman Mer

$50 USD inom 1 dag
(0 omdömen)
0.0
SafaHamdare

I have worked on such projects multiple time. I Can assure u garantee work with well documented word document with all the queries and screenshot as proof of tables created. Can also update the work after submission fr Mer

$27 USD inom 7 dagar
(0 omdömen)
0.0