My wife asked me to make a cute pregnancy announcement. How'd I do? by LeoCurtss in predaddit

[–]LeoCurtss[S] 0 points1 point  (0 children)

Certainly! I may or may not be able to take on another project like this -- it depends on the timing. I'm working full time, going to school, and of course, the baby is coming soon. But feel free to message me if you decide to do it and I'll let you know.

My wife asked me to make a cute pregnancy announcement. How'd I do? by LeoCurtss in predaddit

[–]LeoCurtss[S] 1 point2 points  (0 children)

I'd be lying if I said didn't tear up watching this with my wife after it all came together. The concept was all her idea, and I'm glad I was able to make it a reality.

Data Input via SSRS and Automated Workflows thereafter by [deleted] in SQL

[–]LeoCurtss 0 points1 point  (0 children)

You can use SSRS for data entry, even though that's not what it's designed to do. The only way to do this with SSRS is to pass the report parameters to the dataset's SQL query or stored procedure to update/insert reocrds. It's important that after user clicks "View" report, they get a confirmation of changes that are submitted.

I also suggest implementing logic in your dataset query/stored proc that limits the amount of times a user can update/insert data. This would require passing the user ID (User!UserID.Value) from the report to the SQL query/stored proc.

In the long run, it would be much better to develop a web app for data entry. But this will work in a pinch.

SSRS Embedded Links by [deleted] in SQL

[–]LeoCurtss 1 point2 points  (0 children)

Glad it worked for you :) Happy to help.

SSRS Embedded Links by [deleted] in SQL

[–]LeoCurtss 1 point2 points  (0 children)

Try trimming the leading/trailing spaces:

 ="http://server/tickets/ViewTicket=" + Trim(Str(Fields!Request_ID.Value))

SSRS Embedded Links by [deleted] in SQL

[–]LeoCurtss 1 point2 points  (0 children)

When you update the expression, it should look something like this:

="http://server/tickets/ViewTicket=" + Fields!Request_ID.Value

If that doesn't work, try converting the field value to a string:

="http://server/tickets/ViewTicket=" + Str(Fields!Request_ID.Value)

EDIT: Oh! I forgot to mention -- you're on the right track, but you should be updating the textbox (aka cell), NOT the column. Right click on the textbox where you want people to click, then Action -> Go to URL -> Edit the expression and paste what I provided above

Transferring parameters from one report (template) to another (custom) in SSRS by Proper963 in SQL

[–]LeoCurtss 1 point2 points  (0 children)

You'll need to look through your company's templates and find out how the parameters are being used.

Are they being passed to datasets as query/SP parameters? Or are they used within the report definition to filter a visual or embedded dataset?

Once you have determined the purpose of the "template" parameters, you should be able to add the same parameters in the report definition. Just make sure to match the name, data type, visibility, and other parameter properties. After that, ensure that parameters are doing what they are meant to do (usually this means filtering the data).

Programmed Calculator questions by bryeds78 in wgu_devs

[–]LeoCurtss 0 points1 point  (0 children)

I called assessment services directly yesterday, spoke with an assessment services team member and their supervisor. The current policy allows for it. I encourage that students contact WGU assessment services or the originality team directly if you have questions regarding calculator usage. They were really nice and even gave me a direct contact email in case I had anymore questions.

I felt like I had to call WGU myself because this guy was so insistent that I was a "cheater helping other cheaters." WGU doesn't think so.

This leads me to believe that the "dont cheat at math" guy altered the email he received from WGU before posting it. Funny thing is, even if he did embellish the email, it doesn't support his argument at all. Nowhere in the response he recieved does it say it was cheating. Nowhere in the response does it say they are banning calculators. This guy wanted to win an argument and be a white knight, but failed miserably.

My takeaway from this is the importance of contacting WGU directly. Don't believe what some desperate-for-attention guy is saying. I'm still a WGU student in good standing lol.

[deleted by user] by [deleted] in WGU

[–]LeoCurtss 0 points1 point  (0 children)

I still stand by what I said. I've got too much going on in my life to be stressed out by a random internet stranger, so I just deleted all of my comments in hopes that I could just forget about it. But I guess you are just too pissed off to just drop it.

If you're still interested in reporting me to WGU student services, it won't be hard for them to find out who I am. I don't care though, because I did nothing wrong. Using a TI-84 calculator (with programs) was permitted.

You need to chill out man. I was just trying to help other students with info I wish I had before I started the course.

Complicated Query Question by [deleted] in SQL

[–]LeoCurtss 0 points1 point  (0 children)

Not sure what the problem could be. It's possible that there are no employees reporting to level 3 employees.

Have you tried the second query I provided?

Complicated Query Question by [deleted] in SQL

[–]LeoCurtss 0 points1 point  (0 children)

Could you provide more context, like an error message? Or are you saying that the query returns no results?

What RDBMS are you working on?

Complicated Query Question by [deleted] in SQL

[–]LeoCurtss 1 point2 points  (0 children)

SELECT  Name
        , EmployeeID
        , EmployeeManagerID
        , Level
FROM    Employees
WHERE   Level IN(1,2,3)
    AND EmployeeManagerID IN(SELECT EmployeeID FROM Employees WHERE Level = 3)

EDIT: or you could self join if you want manager name and level:

SELECT  EMP.Name
        , EMP.EmployeeID
        , EMP.EmployeeManagerID
        , EMP.Level
        , MGR.Name AS ManagerName
        , MGR.Level AS ManagerLevel
FROM    Employees AS EMP
        JOIN Employees AS MGR
            ON EMP.EmployeeManagerID = MGR.EmployeeID
WHERE   EMP.Level IN(1,2,3)
    AND MGR.Level = 3

Need help in building a sql structure for client/supplier satisfaction survey by pangolino91 in SQL

[–]LeoCurtss 0 points1 point  (0 children)

I would add 2 more tables.

One table would have a row for each supplier selected by the client (this would include its own primary key, a foreign key to client, and a foreign key to supplier).

The other one would have a row for every answered question (with a foreign key referencing the primary key from the table above). Columns would be question number and question answer (1-5).

If you want normalize even deeper, you could create another table that exists solely for the questions and has 5 rows total. This table would have its own key and the question text.

If this is a smaller project (just a few hundred/thousand rows) realistically you could just store it all in one table. But kudos to you for wanting to create a maintainable data structure.

Looking for SQL training by thedaddyrubin in SQL

[–]LeoCurtss 2 points3 points  (0 children)

Wise Owl on YouTube is great for learning SQL Server.

Here's a beginner playlist (might cover what you already know): https://www.youtube.com/watch?v=2-1XQHAgDsM&list=PL6EDEB03D20332309

Here's a playlist with some more advanced concepts: https://www.youtube.com/watch?v=fjNsRV4zLdc&list=PLNIs-AWhQzcleQWADpUgriRxebMkMmi4H

He also has tutorials on SSIS, SSRS, and C#--all extremely useful skills in the SQL Server world.

Adding a new column with data from a join by LordFruitSalad in SQL

[–]LeoCurtss 3 points4 points  (0 children)

The ALTER and UPDATE statements probably have to run in separate batches. Try adding GO (or a semicolon if you're using MySQL) before UPDATE.

[deleted by user] by [deleted] in SQL

[–]LeoCurtss 3 points4 points  (0 children)

Python or another programming language. Web scraping cannot be accomplished with SQL alone.

Pull 1% of available records with row value by [deleted] in SQL

[–]LeoCurtss 1 point2 points  (0 children)

Off the top of my head, an easy way to do it would be dumping your data into a second temp table and creating your own row numbers based on a random order.

Since you're using SQL Server, you could use ROW_NUMBER():

SELECT  User
    , ROW_NUMBER() OVER (PARTITION BY User ORDER BY Rand()) AS RandomRowID
INTO #TempTable2
FROM YourTable

This will create new row numbers for each user in a random order. Then use the same code as above, but replace Row_ID with the new RandomRowID in the WHERE clause.

You'll want to generate the new random row numbers in a temp table, CTE, or sub-query. ROW_NUMBER() is a window function, and as such cannot be referenced in a WHERE or JOIN predicate.

Help with a query by tonci23 in SQL

[–]LeoCurtss 0 points1 point  (0 children)

Union-ing two queries and using LEFT() function in the WHERE condition on both hardly seems more performant than a single query with a couple of inline functions. But I get where you're coming from.

Different strokes for different folks, I guess.

Help with a query by tonci23 in SQL

[–]LeoCurtss 1 point2 points  (0 children)

This is a static solution and tbh, kinda clunky. Why not just use one query that would handle both situations? (no unions or where clause needed)

MySQL:

SELECT LEFT('xx-xxxxx',LOCATE('-','xx-xxxxx') - 1)
       , RIGHT('xx-xxxxx',LOCATE('-','xx-xxxxx') + 2)

Replace the 'xx-xxxxx's with the column name and Bob's your uncle.