LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-28-2020, 12:16 PM   #16
bmxakias
Member
 
Registered: Jan 2016
Posts: 254

Original Poster
Rep: Reputation: Disabled

Quote:
So what you trying to accomplish?
Have a database and a table inside with 5 columns inside.

I want to the first column to have the site link so when i query for soma data to be able to know from where they are coming from...which site.

Thanks i will do it with the bash loop. I know how to do that. I thought that a Sql command may exist that not need a loop.
 
Old 01-28-2020, 12:35 PM   #17
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,725

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Like some kind of repeat command? I don't know of anything...

There are other methods most will use a loop or sequence of some type. You can create a file with 100 insert commands and then load that file via mysql comand. You can create a data file i.e basically using csv (comma separated variable) format of your data and load that via load data. You could "clone" a row using a select statement but that still needs a loop and a primary key of some sort.
 
Old 01-28-2020, 12:41 PM   #18
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196
From your various descriptions of the problem I am still in doubt that you will get the result that you want.

A more complete description of what you are trying to accomplish and the actual conditions would help others to understand the question and offer suggestions. For example, is there really just one column, or five (you have said both)? Are you expecting the 100 rows of domain names to be pre-filled and persist when you fill in the other unspecified columns? It wont work that way...

You were asked whether there were any key columns and said that there weren't. If there were any then you could UPDATE those with a range of keys specified in a simple WHERE clause... but with our confusion on the table structure...

Please review the Site FAQ for guidance in posting your questions and general forum usage. Especially, read the link in that page, How To Ask Questions The Smart Way. The more effort you put into understanding your problem and framing your questions, the better others can help!

Last edited by astrogeek; 01-28-2020 at 03:14 PM. Reason: WERE did the H go?
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dataset is in one collumn - how to split it into two c. ? sayhello_to_the_world General 2 11-09-2013 03:13 PM
[SOLVED] How to describe table structure in PL/SQL developer IDE through sql command? fantasy1215 Programming 2 04-14-2013 08:20 PM
[SOLVED] bash: sort lines in 2 files so that equal lines are at the same line number... masavini Programming 10 06-21-2012 01:58 PM
deleting 100 rows in text file (1-100) via terminal itz2000 Linux - Newbie 5 01-17-2006 11:19 PM
132 collumn terminal frieza Linux - General 1 02-23-2004 10:29 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration