Showing posts with label idea. Show all posts
Showing posts with label idea. Show all posts

Monday, March 26, 2012

Making random names!

Hi
I have no idea but want to learn it how to make random names with sql server...
I have a table, called table1, for colums Firstname and Last name
I want it to make random names, so much it is possible it can get, in table2 where the colums is named Names
PLEASE HELP :)

knuff--

Regardign this...

knuff wrote:

...I have no idea but want to learn it how to make random names with sql server...

...I say, I am just guessing (and yet I think this is quite possible)...

...I expect that one could use these TSQL functions...

RAND ( [ seed ] )
Returns a random float value from 0 through 1.

ROUND ( numeric_expression , length [ , function ] )
Returns a numeric expression, rounded to the specified length or precision.

CHAR ( int )
A string function that converts an int ASCII code to a character.

...and some string contatenation to get the job done.

That said, I will add that doing something like this is MUCH better suited to middle-tier logic rather than the database, IMHO.

HTH.

Thank you.

--Mark Kamoski

|||Ok... Sounds logical to me what you wrote there i can try out of that

Monday, March 12, 2012

make a report against an InSQL database (was "Question.....")

I am new to the database world and I am trying to understand how all this works. I understand Access and SQL for the most part. My idea that I want to implement is that I want to be able to implement a maintenance log that records motor running life, and piston cycles in the plant. I have a PLC communicating to a server to an InSQL database. Where do i start if i want to make a report that basically counts the total hours that a motor is running, or how many times a piston goes in and out?

any help would be appreciated.InSQL? IndustrialSQL Server is an extension to Microsoft® SQL Server™ 7.0, acquiring plant data at dramatically increased speeds, reducing data storage volumes, and integrating plant data with event, summary, production and configuration data. The FactorySuite™ database server leverages the open and flexible Microsoft platform to truly integrate the office with the factory floor. Production personnel can use Wonderware tools or hundreds of ‘off the shelf’ software packages to view, analyze and report on their production process.if this is what you've got, you should be able to use ordinary SQL Server queries in any of a number of front-end tools

hey, you could even use Access, by linking to your InSQL tables|||So your saying that the data I am looking for is already being stored in the SQL database?|||not saying, guessing ;)

is that, in fact, the product you are using? then yes|||Yes, this is the product I am using. It comes with a program calle d"Activefactory" that has a number of programs for trending, querying, and creating reports. I guess i could just start there.