Skip to content
Advertisement

Tag: sql

JPA distinct inner join with Condition on joined table

I have two tables below: I want to get the college object with list of students of a specific department. The SQL query is below: So far I have tried the below JPA query but it is returning multiple College objects. How to return a single college object with list of students with filtered department? NOTE: I can’t alter the

How to add a comment to flyway migration

I am trying to make my big migration more self explaining and that’s why I need to add some comments to it. However, I tried a few approaches and haven’t succeeded with them. I tried: // # <!– TEXT –> Error: Is there a way I can add a comment to flyway SQL migration? Answer The following should work on

SQL BCP Unable to insert value for identity column

I am using bcp utility to import a tab delimited file. My table has an identity column, when I run bcp command I get error as Error = [Microsoft][SQL Server Native Client 11.0] Invalid date format Second column is datetime. When i use -E flag (as suggested by many), I get error as Error = [Microsoft][SQL Server Native Client 11.0]

Advertisement